gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r464 - in GNUnet: libltdl src/applications/advertising src/


From: grothoff
Subject: [GNUnet-SVN] r464 - in GNUnet: libltdl src/applications/advertising src/applications/bootstrap_http src/applications/chat src/applications/datastore src/applications/dht/module src/applications/dht/tools src/applications/fragmentation src/applications/fs src/applications/fs/ecrs src/applications/fs/fsui src/applications/fs/lib src/applications/fs/module src/applications/fs/tools src/applications/gap src/applications/getoption src/applications/identity src/applications/pingpong src/applications/rpc src/applications/session src/applications/sqstore_mysql src/applications/sqstore_sqlite src/applications/stats src/applications/tbench src/applications/template src/applications/testbed src/applications/topology_default src/applications/topology_f2f src/applications/tracekit src/applications/traffic src/applications/transport src/conf src/include src/server src/transports src/util src/util/win
Date: Sun, 20 Mar 2005 15:54:57 -0800 (PST)

Author: grothoff
Date: 2005-03-20 15:54:53 -0800 (Sun, 20 Mar 2005)
New Revision: 464

Modified:
   GNUnet/libltdl/ltdl.c
   GNUnet/src/applications/advertising/advertising.c
   GNUnet/src/applications/advertising/bootstrap.c
   GNUnet/src/applications/bootstrap_http/http.c
   GNUnet/src/applications/chat/chat.c
   GNUnet/src/applications/chat/chat.h
   GNUnet/src/applications/chat/gnunet-chat.c
   GNUnet/src/applications/datastore/datastore.c
   GNUnet/src/applications/datastore/filter.c
   GNUnet/src/applications/datastore/prefetch.c
   GNUnet/src/applications/dht/module/cs.c
   GNUnet/src/applications/dht/module/datastore_dht_master.c
   GNUnet/src/applications/dht/module/datastore_dht_master.h
   GNUnet/src/applications/dht/module/datastore_memory.c
   GNUnet/src/applications/dht/module/datastore_memory_test.c
   GNUnet/src/applications/dht/module/dht.c
   GNUnet/src/applications/dht/module/dht_test.c
   GNUnet/src/applications/dht/tools/dht-join.c
   GNUnet/src/applications/dht/tools/dht-query.c
   GNUnet/src/applications/dht/tools/dht_api.c
   GNUnet/src/applications/fragmentation/fragmentation.c
   GNUnet/src/applications/fragmentation/fragmentationtest.c
   GNUnet/src/applications/fs/ecrs/directory.c
   GNUnet/src/applications/fs/ecrs/directorytest.c
   GNUnet/src/applications/fs/ecrs/download.c
   GNUnet/src/applications/fs/ecrs/ecrs.c
   GNUnet/src/applications/fs/ecrs/ecrs.h
   GNUnet/src/applications/fs/ecrs/ecrstest.c
   GNUnet/src/applications/fs/ecrs/indexinfo.c
   GNUnet/src/applications/fs/ecrs/keyspace.c
   GNUnet/src/applications/fs/ecrs/meta.c
   GNUnet/src/applications/fs/ecrs/metatest.c
   GNUnet/src/applications/fs/ecrs/namespace.c
   GNUnet/src/applications/fs/ecrs/search.c
   GNUnet/src/applications/fs/ecrs/searchtest.c
   GNUnet/src/applications/fs/ecrs/tree.c
   GNUnet/src/applications/fs/ecrs/tree.h
   GNUnet/src/applications/fs/ecrs/unindex.c
   GNUnet/src/applications/fs/ecrs/upload.c
   GNUnet/src/applications/fs/ecrs/uri.c
   GNUnet/src/applications/fs/ecrs/uri.h
   GNUnet/src/applications/fs/ecrs/uritest.c
   GNUnet/src/applications/fs/ecrs_core.c
   GNUnet/src/applications/fs/fsui/collection.c
   GNUnet/src/applications/fs/fsui/download.c
   GNUnet/src/applications/fs/fsui/file_info.c
   GNUnet/src/applications/fs/fsui/fsui.c
   GNUnet/src/applications/fs/fsui/fsui.h
   GNUnet/src/applications/fs/fsui/helper.c
   GNUnet/src/applications/fs/fsui/namespace_info.c
   GNUnet/src/applications/fs/fsui/search.c
   GNUnet/src/applications/fs/fsui/upload.c
   GNUnet/src/applications/fs/lib/fslib.c
   GNUnet/src/applications/fs/lib/fslibtest.c
   GNUnet/src/applications/fs/module/fs.c
   GNUnet/src/applications/fs/module/migration.c
   GNUnet/src/applications/fs/module/migration.h
   GNUnet/src/applications/fs/module/ondemand.c
   GNUnet/src/applications/fs/module/ondemand.h
   GNUnet/src/applications/fs/module/querymanager.c
   GNUnet/src/applications/fs/module/querymanager.h
   GNUnet/src/applications/fs/tools/gnunet-delete.c
   GNUnet/src/applications/fs/tools/gnunet-directory.c
   GNUnet/src/applications/fs/tools/gnunet-download.c
   GNUnet/src/applications/fs/tools/gnunet-insert.c
   GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
   GNUnet/src/applications/fs/tools/gnunet-search.c
   GNUnet/src/applications/gap/gap.c
   GNUnet/src/applications/getoption/clientapi.c
   GNUnet/src/applications/getoption/getoption.h
   GNUnet/src/applications/identity/hostkey.c
   GNUnet/src/applications/identity/hostkey.h
   GNUnet/src/applications/identity/identity.c
   GNUnet/src/applications/identity/identitytest.c
   GNUnet/src/applications/pingpong/pingpong.c
   GNUnet/src/applications/rpc/parameters.c
   GNUnet/src/applications/rpc/parameterstest.c
   GNUnet/src/applications/rpc/rpc.c
   GNUnet/src/applications/session/connect.c
   GNUnet/src/applications/session/sessiontest.c
   GNUnet/src/applications/sqstore_mysql/mysql.c
   GNUnet/src/applications/sqstore_mysql/mysqltest.c
   GNUnet/src/applications/sqstore_sqlite/sqlite.c
   GNUnet/src/applications/sqstore_sqlite/sqlitetest.c
   GNUnet/src/applications/stats/clientapi.c
   GNUnet/src/applications/stats/gnunet-stats.c
   GNUnet/src/applications/stats/statistics.c
   GNUnet/src/applications/stats/statistics.h
   GNUnet/src/applications/tbench/gnunet-tbench.c
   GNUnet/src/applications/tbench/tbench.c
   GNUnet/src/applications/tbench/tbench.h
   GNUnet/src/applications/tbench/tbenchtest.c
   GNUnet/src/applications/template/gnunet-template.c
   GNUnet/src/applications/testbed/commands.c
   GNUnet/src/applications/testbed/gnunet-testbed.c
   GNUnet/src/applications/testbed/socket.c
   GNUnet/src/applications/testbed/socket.h
   GNUnet/src/applications/testbed/testbed.c
   GNUnet/src/applications/testbed/testbed.h
   GNUnet/src/applications/topology_default/topology.c
   GNUnet/src/applications/topology_f2f/topology.c
   GNUnet/src/applications/tracekit/gnunet-tracekit.c
   GNUnet/src/applications/tracekit/tracekit.c
   GNUnet/src/applications/tracekit/tracekit.h
   GNUnet/src/applications/traffic/clientapi.c
   GNUnet/src/applications/traffic/traffic.c
   GNUnet/src/applications/traffic/traffic.h
   GNUnet/src/applications/transport/transport.c
   GNUnet/src/conf/confdata.c
   GNUnet/src/conf/expr.c
   GNUnet/src/conf/expr.h
   GNUnet/src/conf/gconf.c
   GNUnet/src/conf/gnunet-setup.c
   GNUnet/src/conf/gnunet-win-tool.c
   GNUnet/src/conf/images.c
   GNUnet/src/conf/lex.zconf.c
   GNUnet/src/conf/lkc_proto.h
   GNUnet/src/conf/mconf.c
   GNUnet/src/conf/mconf_checklist.c
   GNUnet/src/conf/mconf_colors.h
   GNUnet/src/conf/mconf_dialog.h
   GNUnet/src/conf/mconf_menubox.c
   GNUnet/src/conf/mconf_msgbox.c
   GNUnet/src/conf/mconf_util.c
   GNUnet/src/conf/mconf_yesno.c
   GNUnet/src/conf/zconf_tab.c
   GNUnet/src/include/ecrs_core.h
   GNUnet/src/include/fs.h
   GNUnet/src/include/gettext.h
   GNUnet/src/include/gnunet_blockstore.h
   GNUnet/src/include/gnunet_bootstrap_service.h
   GNUnet/src/include/gnunet_core.h
   GNUnet/src/include/gnunet_datastore_service.h
   GNUnet/src/include/gnunet_dht.h
   GNUnet/src/include/gnunet_dht_datastore_memory.h
   GNUnet/src/include/gnunet_dht_lib.h
   GNUnet/src/include/gnunet_dht_service.h
   GNUnet/src/include/gnunet_ecrs_lib.h
   GNUnet/src/include/gnunet_fs_lib.h
   GNUnet/src/include/gnunet_fsui_lib.h
   GNUnet/src/include/gnunet_gap_service.h
   GNUnet/src/include/gnunet_getoption_lib.h
   GNUnet/src/include/gnunet_gnunetd_lib.h
   GNUnet/src/include/gnunet_identity_service.h
   GNUnet/src/include/gnunet_protocols.h
   GNUnet/src/include/gnunet_rpc_service.h
   GNUnet/src/include/gnunet_session_service.h
   GNUnet/src/include/gnunet_sqstore_service.h
   GNUnet/src/include/gnunet_stats_lib.h
   GNUnet/src/include/gnunet_stats_service.h
   GNUnet/src/include/gnunet_topology_service.h
   GNUnet/src/include/gnunet_traffic_service.h
   GNUnet/src/include/gnunet_transport.h
   GNUnet/src/include/gnunet_transport_service.h
   GNUnet/src/include/gnunet_util.h
   GNUnet/src/include/platform.h
   GNUnet/src/include/winproc.h
   GNUnet/src/server/connection.c
   GNUnet/src/server/connection.h
   GNUnet/src/server/core.c
   GNUnet/src/server/gnunet-peer-info.c
   GNUnet/src/server/gnunet-transport-check.c
   GNUnet/src/server/gnunet-update.c
   GNUnet/src/server/gnunetd.c
   GNUnet/src/server/handler.c
   GNUnet/src/server/handler.h
   GNUnet/src/server/startup.c
   GNUnet/src/server/startup.h
   GNUnet/src/server/tcpserver.c
   GNUnet/src/server/tcpserver.h
   GNUnet/src/server/version.c
   GNUnet/src/transports/http.c
   GNUnet/src/transports/nat.c
   GNUnet/src/transports/smtp.c
   GNUnet/src/transports/tcp.c
   GNUnet/src/transports/tcp6.c
   GNUnet/src/transports/udp.c
   GNUnet/src/transports/udp6.c
   GNUnet/src/util/bloomfilter.c
   GNUnet/src/util/bloomtest.c
   GNUnet/src/util/checksum.c
   GNUnet/src/util/configtest.c
   GNUnet/src/util/configuration.c
   GNUnet/src/util/crctest.c
   GNUnet/src/util/cron.c
   GNUnet/src/util/crontest.c
   GNUnet/src/util/dso.c
   GNUnet/src/util/getopt.c
   GNUnet/src/util/hashing.c
   GNUnet/src/util/hashingtest.c
   GNUnet/src/util/hashtest.c
   GNUnet/src/util/hostkey_gcrypt.c
   GNUnet/src/util/hostkeytest.c
   GNUnet/src/util/identitytest.c
   GNUnet/src/util/initialize.c
   GNUnet/src/util/io.c
   GNUnet/src/util/ipcheck.c
   GNUnet/src/util/kblockkey.c
   GNUnet/src/util/kblockkey_test.c
   GNUnet/src/util/locking_gcrypt.c
   GNUnet/src/util/logging.c
   GNUnet/src/util/port.c
   GNUnet/src/util/printhelp.c
   GNUnet/src/util/random_gcrypt.c
   GNUnet/src/util/semaphore.c
   GNUnet/src/util/semaphoretest.c
   GNUnet/src/util/shutdown.c
   GNUnet/src/util/shutdowntest.c
   GNUnet/src/util/state.c
   GNUnet/src/util/statetest.c
   GNUnet/src/util/statuscalls.c
   GNUnet/src/util/statuscallstest.c
   GNUnet/src/util/storage.c
   GNUnet/src/util/storagetest.c
   GNUnet/src/util/symcipher_gcrypt.c
   GNUnet/src/util/symciphertest.c
   GNUnet/src/util/tcp_return.c
   GNUnet/src/util/tcpio.c
   GNUnet/src/util/tcpiotest.c
   GNUnet/src/util/timer.c
   GNUnet/src/util/timertest.c
   GNUnet/src/util/vector.c
   GNUnet/src/util/vectortest.c
   GNUnet/src/util/weakkeytest.c
   GNUnet/src/util/win/win_printf.c
   GNUnet/src/util/win/winproc.c
   GNUnet/src/util/win/winselect.c
   GNUnet/src/util/win/winstrptime.c
   GNUnet/src/util/xmalloc.c
   GNUnet/src/util/xmalloctest.c
Log:
removing tailing whitespace

Modified: GNUnet/libltdl/ltdl.c
===================================================================
--- GNUnet/libltdl/ltdl.c       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/libltdl/ltdl.c       2005-03-20 23:54:53 UTC (rev 464)
@@ -1606,14 +1606,14 @@
 static enum DYLD_BOOL (*ltdl_NSMakePrivateModulePublic)(NSModule module) = 0;
 
 #ifndef NSADDIMAGE_OPTION_NONE
-#define NSADDIMAGE_OPTION_NONE                          0x0    
+#define NSADDIMAGE_OPTION_NONE                          0x0
 #endif
 #ifndef NSADDIMAGE_OPTION_RETURN_ON_ERROR
 #define NSADDIMAGE_OPTION_RETURN_ON_ERROR               0x1
-#endif    
+#endif
 #ifndef NSADDIMAGE_OPTION_WITH_SEARCHING
 #define NSADDIMAGE_OPTION_WITH_SEARCHING                0x2
-#endif    
+#endif
 #ifndef NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED
 #define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED         0x4
 #endif
@@ -1622,7 +1622,7 @@
 #endif
 #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND
 #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND            0x0
-#endif   
+#endif
 #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
 #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW        0x1
 #endif
@@ -1647,7 +1647,7 @@
        if (!errstr || !strlen(errstr)) errstr = othererror;
        return errstr;
 }
- 
+
 static const struct mach_header *
 lt_int_dyld_get_mach_header_from_nsmodule(module)
        NSModule module;
@@ -1687,7 +1687,7 @@
                lc = (struct load_command*)(((unsigned long)mh) + offset);
                if (LC_ID_DYLIB == lc->cmd)
                {
-                       retStr=(char*)(((struct 
dylib_command*)lc)->dylib.name.offset + 
+                       retStr=(char*)(((struct 
dylib_command*)lc)->dylib.name.offset +
                                                                        
(unsigned long)lc);
                }
                offset += lc->cmdsize;
@@ -1732,14 +1732,14 @@
                        lc = (struct load_command*)(((unsigned long)mh) + 
offset);
                        if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB 
== lc->cmd))
                        {
-                               
mh1=lt_int_dyld_match_loaded_lib_by_install_name((char*)(((struct 
dylib_command*)lc)->dylib.name.offset + 
+                               
mh1=lt_int_dyld_match_loaded_lib_by_install_name((char*)(((struct 
dylib_command*)lc)->dylib.name.offset +
                                                                                
(unsigned long)lc));
                                if (!mh1)
                                {       
                                        /* Maybe NSAddImage can find it */      
                                                                                
        
-                                       mh1=ltdl_NSAddImage((char*)(((struct 
dylib_command*)lc)->dylib.name.offset + 
+                                       mh1=ltdl_NSAddImage((char*)(((struct 
dylib_command*)lc)->dylib.name.offset +
                                                                                
(unsigned long)lc),
-                                                                               
NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED + 
+                                                                               
NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED +
                                                                                
NSADDIMAGE_OPTION_WITH_SEARCHING +
                                                                                
NSADDIMAGE_OPTION_RETURN_ON_ERROR );
                                }                                               
@@ -1747,7 +1747,7 @@
                                {
                                        retSym = ltdl_NSLookupSymbolInImage(mh1,
                                                                                
        symbol,
-                                                                               
        NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 
+                                                                               
        NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
                                                                                
        | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
                                                                                
        );
                                        if (retSym) break;                      
                        
@@ -1764,7 +1764,7 @@
 {
        int retCode = 0;
        int err = 0;
-       if (!_dyld_present()) { 
+       if (!_dyld_present()) {
                retCode=1;
        }
        else {
@@ -1785,7 +1785,7 @@
        NSObjectFileImage ofi = 0;
        NSObjectFileImageReturnCode ofirc;
        
-       if (!filename) 
+       if (!filename)
                return (lt_module)-1;
        ofirc = NSCreateObjectFileImageFromFile(filename, &ofi);
        switch (ofirc)
@@ -1826,7 +1826,7 @@
        if (((struct mach_header *)module)->magic == MH_MAGIC)
 #else          
     if (((struct mach_header *)module)->magic == MH_CIGAM)
-#endif 
+#endif
        {
          LT_DLMUTEX_SETERROR("Can not close a dylib");
          retCode = 1;
@@ -1837,13 +1837,13 @@
 /* Currently, if a module contains c++ static destructors and it is unloaded, 
we
    get a segfault in atexit(), due to compiler and dynamic loader differences 
of
    opinion, this works around that.
-*/   
-               if ((const struct section *)NULL != 
+*/
+               if ((const struct section *)NULL !=
                   
getsectbynamefromheader(lt_int_dyld_get_mach_header_from_nsmodule(module),
                   "__DATA","__mod_term_func"))
                {
                        flags += NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED;
-               } 
+               }
 #endif         
 #ifdef __ppc__
                        flags += NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES;
@@ -1877,31 +1877,31 @@
        if (((struct mach_header *)module)->magic == MH_MAGIC)
 #else          
     if (((struct mach_header *)module)->magic == MH_CIGAM)
-#endif    
+#endif
        {
            if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage)
            {
                mh=module;
-                       if (ltdl_NSIsSymbolNameDefinedInImage((struct 
mach_header*)module,symbol)) 
+                       if (ltdl_NSIsSymbolNameDefinedInImage((struct 
mach_header*)module,symbol))
                        {
                                nssym = ltdl_NSLookupSymbolInImage((struct 
mach_header*)module,
                                                                                
        symbol,
-                                                                               
        NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 
+                                                                               
        NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW
                                                                                
        | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR
                                                                                
        );
                        }
            }   
-  
-       }    
+
+       }
   else {
        nssym = NSLookupSymbolInModule(module, symbol);
        }
-       if (!nssym) 
+       if (!nssym)
        {
                if (!mh) mh=lt_int_dyld_get_mach_header_from_nsmodule(module);
                nssym = lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh);
        }               
-       if (!nssym) 
+       if (!nssym)
        {
                LT_DLMUTEX_SETERROR 
(lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND)));
                return NULL;

Modified: GNUnet/src/applications/advertising/advertising.c
===================================================================
--- GNUnet/src/applications/advertising/advertising.c   2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/advertising/advertising.c   2005-03-20 23:54:53 UTC 
(rev 464)
@@ -21,7 +21,7 @@
 /**
  * @file advertising/advertising.c
  * @brief Cron-jobs that exchange HELOs to ensure that the network is
- * connected (nodes know of each other).  This is implemented as 
+ * connected (nodes know of each other).  This is implemented as
  * an application and not a service (since no API is provided for
  * clients to call on -- this just happens in the background).
  *
@@ -88,11 +88,11 @@
  */
 static int activeCronJobs = ACJ_NONE;
 
-static cron_t lastHELOMsg = 0; 
+static cron_t lastHELOMsg = 0;
 
 static double getConnectPriority() {
   double preference;
-  
+
   /* we should'nt give lots of bandwidth for HELOs if we're close to
      the connection goal */
   preference = topology->getSaturation();
@@ -120,14 +120,14 @@
  * @param message the HELO message
  * @return SYSERR on error, OK on success
  */
-static int 
+static int
 receivedHELO(const p2p_HEADER * message) {
   TSession * tsession;
   HELO_Message * copy;
   PeerIdentity foreignId;
   HELO_Message * msg;
   p2p_HEADER * ping;
-  char * buffer;    
+  char * buffer;
   int heloEnd;
   int mtu;
   int res;
@@ -143,9 +143,9 @@
                         &foreignId.hashPubKey))
     return SYSERR; /* public key and host hash do not match */
   if (SYSERR == verifySig(&msg->senderIdentity,
-                         HELO_Message_size(msg) 
-                         - sizeof(Signature) 
-                         - sizeof(PublicKey) 
+                         HELO_Message_size(msg)
+                         - sizeof(Signature)
+                         - sizeof(PublicKey)
                          - sizeof(p2p_HEADER),
                          &msg->signature,
                          &msg->publicKey)) {
@@ -153,18 +153,18 @@
     IFLOG(LOG_WARNING,
          hash2enc(&msg->senderIdentity.hashPubKey,
                   &enc));
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("HELO message from '%s' invalid (signature invalid). Dropping.\n"),
        (char*)&enc);
-    return SYSERR; /* message invalid */  
+    return SYSERR; /* message invalid */
   }
   if ((TIME_T)ntohl(msg->expirationTime) > TIME(NULL) + MAX_HELO_EXPIRES) {
-     LOG(LOG_WARNING, 
-        _("HELO message received invalid (expiration time over limit). 
Dropping.\n"));   
+     LOG(LOG_WARNING,
+        _("HELO message received invalid (expiration time over limit). 
Dropping.\n"));
     return SYSERR;
   }
-  if (SYSERR == transport->verifyHELO(msg)) 
-    return OK; /* not good, but do process rest of message */ 
+  if (SYSERR == transport->verifyHELO(msg))
+    return OK; /* not good, but do process rest of message */
   if (stats != NULL)
     stats->change(stat_HELO_in, 1);
 #if DEBUG_HELOEXCHANGE
@@ -198,7 +198,7 @@
         (0 == memcmp(&msg->MTU,
                      &copy->MTU,
                      sizeof(unsigned short)*2+
-                     sizeof(unsigned int) + 
+                     sizeof(unsigned int) +
                      ntohs(copy->senderAddressSize)) ) ) {
       /* ok, we've seen this one exactly like this before (at most the
         TTL has changed); thus we can 'trust' it without playing
@@ -243,7 +243,7 @@
        if the NAT transport is loaded; for that,
        a couple of lines above would need some minor
        editing :-). */
-    return SYSERR; 
+    return SYSERR;
   }
 
   cronTime(&now);
@@ -252,7 +252,7 @@
                           "MAXNETDOWNBPSTOTAL") /
        cronSECONDS / 100
        < HELO_Message_size(msg) ) {
-    /* do not use more than about 1% of the 
+    /* do not use more than about 1% of the
        available bandwidth to VERIFY HELOs (by sending
        our own with a PING).  This does not affect
        the HELO advertising.  Sure, we should not
@@ -273,8 +273,8 @@
         msg,
         HELO_Message_size(msg));
   identity->addHostTemporarily(copy);
-  
 
+
   /* Establish session as advertised in the HELO */
   copy = MALLOC(HELO_Message_size(msg));
   memcpy(copy,
@@ -285,7 +285,7 @@
                                   &tsession)) {
     FREE(copy);
     return SYSERR; /* could not connect */
-  }    
+  }
 
   /* build message to send, ping must contain return-information,
      such as a selection of our HELOs... */
@@ -312,7 +312,7 @@
        "'%s' failed. Will not send PING.\n",
        "getAdvertisedHELOs");
     FREE(buffer);
-    transport->disconnect(tsession);    
+    transport->disconnect(tsession);
     return SYSERR;
   }
   copy = MALLOC(HELO_Message_size(msg));
@@ -345,7 +345,7 @@
   int n;
 } SendData;
 
-static void 
+static void
 broadcastHelper(const PeerIdentity * hi,
                const unsigned short proto,
                int confirmed,
@@ -359,7 +359,7 @@
     return;
   if (proto == NAT_PROTOCOL_NUMBER)
     return; /* don't advertise NAT addresses via broadcast */
-  if (randomi(sd->n) != 0) 
+  if (randomi(sd->n) != 0)
     return;
   hash2enc(&hi->hashPubKey,
           &other);
@@ -430,10 +430,10 @@
  }
 
 /**
- * Tell a couple of random hosts on the currentKnownHost list 
+ * Tell a couple of random hosts on the currentKnownHost list
  * that we exist (called for each transport)...
  */
-static void 
+static void
 broadcastHELOTransport(TransportAPI * tapi,
                       void * unused) {
   SendData sd;
@@ -446,7 +446,7 @@
 #endif
   cronTime(&now);
   sd.n = identity->forEachHost(now,
-                              NULL, 
+                              NULL,
                               NULL); /* just count */
   if (SYSERR == transport->createHELO(tapi->protocolNumber,
                                    &sd.m))
@@ -458,7 +458,7 @@
 #endif
   identity->addHost(sd.m);
   if (sd.n < 1) {
-    if (identity->forEachHost(0, NULL, NULL) == 0) 
+    if (identity->forEachHost(0, NULL, NULL) == 0)
       LOG(LOG_WARNING,
          _("Announcing ourselves pointless: "
            "no other peers are known to us so far.\n"));
@@ -477,7 +477,7 @@
 }
 
 /**
- * Tell a couple of random hosts on the currentKnownHost list 
+ * Tell a couple of random hosts on the currentKnownHost list
  * that we exist...
  */
 static void broadcastHELO(void * unused) {
@@ -506,7 +506,7 @@
 /**
  * Forward HELOs from all known hosts to all connected hosts.
  */
-static void 
+static void
 forwardHELOHelper(const PeerIdentity * peer,
                  const unsigned short protocol,
                  int confirmed,
@@ -532,15 +532,15 @@
                                        NO,
                                        &helo))
     return; /* this should not happen */
-  helo->header.type 
-    = htons(p2p_PROTO_HELO); 
+  helo->header.type
+    = htons(p2p_PROTO_HELO);
   helo->header.size
     = htons(HELO_Message_size(helo));
   /* do not forward expired HELOs */
   TIME(&now);
   if ((TIME_T)ntohl(helo->expirationTime) < now) {
     EncName enc;
-    /* remove HELOs that expired */ 
+    /* remove HELOs that expired */
     IFLOG(LOG_INFO,
          hash2enc(&peer->hashPubKey,
                   &enc));
@@ -552,13 +552,13 @@
     FREE(helo);
     return;
   }
-  count = coreAPI->forAllConnectedNodes(NULL, 
+  count = coreAPI->forAllConnectedNodes(NULL,
                                        NULL);
   if (count > 0) {
     fcc.delay = (*probability) * HELO_BROADCAST_FREQUENCY;  /* send before the 
next round */
     fcc.msg = &helo->header;
     fcc.prob = count;
-    coreAPI->forAllConnectedNodes((PerNodeCallback) &forwardCallback, 
+    coreAPI->forAllConnectedNodes((PerNodeCallback) &forwardCallback,
                                  &fcc);
   }
   FREE(helo);
@@ -580,7 +580,7 @@
 #endif
   count = identity->forEachHost(0,
                                NULL,
-                               NULL);  
+                               NULL);
   identity->forEachHost(0, /* ignore blacklisting */
                        (HostIterator)&forwardHELOHelper,
                        &count);
@@ -594,15 +594,15 @@
 /**
  * Type for a HELO send via an encrypted channel.
  */
-static int 
+static int
 eHELOHandler(const PeerIdentity * sender,
             const p2p_HEADER * message) {
   if (OK == receivedHELO(message)) {
     /* if the HELO was ok, update traffic preference
        for the peer (depending on how much we like
        to learn about other peers) */
-    coreAPI->preferTrafficFrom(sender, 
-                              getConnectPriority());    
+    coreAPI->preferTrafficFrom(sender,
+                              getConnectPriority());
   }
   return OK; /* even if we had errors processing the HELO, keep going */
 }
@@ -610,7 +610,7 @@
 /**
  * Type for a HELO send in plaintext.
  */
-static int 
+static int
 pHELOHandler(const PeerIdentity * sender,
             const p2p_HEADER * message,
             TSession * session) {
@@ -623,30 +623,30 @@
  * Does not have to suspend cron since this guaranteed to be a cron
  * job!
  */
-static void 
+static void
 configurationUpdateCallback() {
   if (ACJ_ANNOUNCE == (activeCronJobs & ACJ_ANNOUNCE)) {
     if (testConfigurationString("NETWORK",
                                "DISABLE-ADVERTISEMENTS",
-                               "YES")) 
+                               "YES"))
       delCronJob(&broadcastHELO,
                 HELO_BROADCAST_FREQUENCY,
-                NULL); 
+                NULL);
     activeCronJobs -= ACJ_ANNOUNCE;
   } else {
     if (testConfigurationString("NETWORK",
                                "HELOEXCHANGE",
-                               "YES")) 
+                               "YES"))
       addCronJob(&broadcastHELO,
-                15 * cronSECONDS, 
+                15 * cronSECONDS,
                 HELO_BROADCAST_FREQUENCY,
-                NULL); 
+                NULL);
     activeCronJobs += ACJ_ANNOUNCE;
   }
   if (ACJ_FORWARD == (activeCronJobs & ACJ_FORWARD)) {
     if (! testConfigurationString("NETWORK",
                                  "HELOEXCHANGE",
-                                 "YES")) 
+                                 "YES"))
       delCronJob(&forwardHELO,
                 HELO_FORWARD_FREQUENCY,
                 NULL); /* seven minutes: exchange */
@@ -654,11 +654,11 @@
   } else {
     if (! testConfigurationString("NETWORK",
                                  "DISABLE-ADVERTISEMENTS",
-                                 "YES")) 
+                                 "YES"))
       addCronJob(&broadcastHELO,
-                15 * cronSECONDS, 
+                15 * cronSECONDS,
                 HELO_BROADCAST_FREQUENCY,
-                NULL); 
+                NULL);
     activeCronJobs += ACJ_FORWARD;
   }
 }
@@ -672,7 +672,7 @@
   identity = capi->requestService("identity");
   if (identity == NULL) {
     BREAK();
-    return SYSERR;  
+    return SYSERR;
   }
   transport = capi->requestService("transport");
   if (transport == NULL) {
@@ -722,9 +722,9 @@
                                "DISABLE-ADVERTISEMENTS",
                                "YES")) {
     addCronJob(&broadcastHELO,
-              15 * cronSECONDS, 
+              15 * cronSECONDS,
               HELO_BROADCAST_FREQUENCY,
-              NULL); 
+              NULL);
     activeCronJobs += ACJ_ANNOUNCE;
   } else {
     LOG(LOG_WARNING,
@@ -734,17 +734,17 @@
                              "HELOEXCHANGE",
                              "YES") == YES) {
     addCronJob(&forwardHELO,
-              4 * cronMINUTES, 
+              4 * cronMINUTES,
               HELO_FORWARD_FREQUENCY,
-              NULL); 
+              NULL);
     activeCronJobs += ACJ_FORWARD;
   }
 #if DEBUG_HELOEXCHANGE
   else
-    LOG(LOG_DEBUG, 
+    LOG(LOG_DEBUG,
        "HELO forwarding disabled!\n");
 #endif
-  
+
   startBootstrap(capi);
   return OK;
 }
@@ -757,7 +757,7 @@
   if (ACJ_ANNOUNCE == (activeCronJobs & ACJ_ANNOUNCE)) {
     delCronJob(&broadcastHELO,
               HELO_BROADCAST_FREQUENCY,
-              NULL); 
+              NULL);
     activeCronJobs -= ACJ_ANNOUNCE;
   }
   if (ACJ_FORWARD == (activeCronJobs & ACJ_FORWARD)) {

Modified: GNUnet/src/applications/advertising/bootstrap.c
===================================================================
--- GNUnet/src/applications/advertising/bootstrap.c     2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/advertising/bootstrap.c     2005-03-20 23:54:53 UTC 
(rev 464)
@@ -41,7 +41,7 @@
 static int ptPID;
 
 static int abort_bootstrap = YES;
-  
+
 typedef struct {
   HELO_Message ** helos;
   int helosCount;
@@ -73,7 +73,7 @@
     GROW(hcq->helos,
         hcq->helosCount,
         hcq->helosCount-1);
-    
+
     coreAPI->injectMessage(&msg->senderIdentity,
                           (char*)msg,
                           HELO_Message_size(msg),
@@ -82,7 +82,7 @@
     FREE(msg);
     if ( (hcq->helosCount > 0) &&
         (abort_bootstrap == NO) ) {
-      /* wait a bit */ 
+      /* wait a bit */
       int load;
       int nload;
       load = getCPULoad();
@@ -128,7 +128,7 @@
   cronTime(&now);
   if (coreAPI->forAllConnectedNodes(NULL, NULL) > 4) {
     /* still change delta and lastTest; even
-       if the peer _briefly_ drops below 4 
+       if the peer _briefly_ drops below 4
        connections, we don't want it to immediately
        go for the hostlist... */
     delta = 5 * cronMINUTES;
@@ -155,7 +155,7 @@
     lastTest = now;
     delta *= 2; /* exponential back-off */
     /* Maybe it should ALSO be based on how many peers
-       we know (identity).  
+       we know (identity).
        Sure, in the end it goes to the topology, so
        probably that API should be extended here... */
     return YES;
@@ -170,7 +170,7 @@
 
   ptPID = getpid();
   cls.helos = NULL;
-  while (abort_bootstrap == NO) {    
+  while (abort_bootstrap == NO) {
     while (abort_bootstrap == NO) {
       gnunet_util_sleep(2 * cronSECONDS);
       if (needBootstrap())
@@ -217,7 +217,7 @@
   PTHREAD_KILL(&pt, SIGALRM);
 #else
   /* linux */
-  if (ptPID != 0) 
+  if (ptPID != 0)
     kill(ptPID, SIGALRM);
 #endif
   PTHREAD_JOIN(&pt, &unused);

Modified: GNUnet/src/applications/bootstrap_http/http.c
===================================================================
--- GNUnet/src/applications/bootstrap_http/http.c       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/bootstrap_http/http.c       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -44,7 +44,7 @@
  * Download hostlist from the web and call method
  * on each HELO.
  */
-static void 
+static void
 downloadHostlistHelper(char * url,
                       HELO_Callback callback,
                       void * arg) {
@@ -65,9 +65,9 @@
   port = TCP_HTTP_PORT;
 
   if (0 != strncmp(HTTP_URL, url, strlen(HTTP_URL)) ) {
-    LOG(LOG_WARNING, 
-       _("Invalid URL '%s' (must begin with '%s')\n"), 
-       url, 
+    LOG(LOG_WARNING,
+       _("Invalid URL '%s' (must begin with '%s')\n"),
+       url,
        HTTP_URL);
     return;
   }
@@ -78,9 +78,9 @@
     curpos++;
   if (curpos == strlen(url))
     filename = STRDUP("/");
-  else 
+  else
     filename = STRDUP(&url[curpos]);
-  url[curpos] = '\0'; /* terminator for hostname */  
+  url[curpos] = '\0'; /* terminator for hostname */
 
   sock = SOCKET(PF_INET, SOCK_STREAM, 0);
   if (sock < 0) {
@@ -103,21 +103,21 @@
       FREE(filename);
       return;
     }
-    
-    soaddr.sin_addr.s_addr 
+
+    soaddr.sin_addr.s_addr
       = ((struct in_addr*)(ip_info->h_addr))->s_addr;
-    soaddr.sin_port 
+    soaddr.sin_port
       = htons(TCP_HTTP_PORT);
   } else {
-    soaddr.sin_addr.s_addr 
+    soaddr.sin_addr.s_addr
       = theProxy.sin_addr.s_addr;
-    soaddr.sin_port 
+    soaddr.sin_port
       = theProxy.sin_port;
   }
   soaddr.sin_family = AF_INET;
 
-  if (CONNECT(sock, 
-             (struct sockaddr*)&soaddr, 
+  if (CONNECT(sock,
+             (struct sockaddr*)&soaddr,
              sizeof(soaddr)) < 0) {
     LOG(LOG_WARNING,
        _("'%s' to '%s' failed at %s:%d with error: %s\n"),
@@ -129,10 +129,10 @@
     CLOSE(sock);
     return;
   }
-  
+
   n = strlen(filename) + strlen(GET_COMMAND) + strlen(hostname) + 1;
   command = MALLOC(n);
-  SNPRINTF(command, 
+  SNPRINTF(command,
           n,
           GET_COMMAND,
           hostname,
@@ -168,18 +168,18 @@
                               &ret);
     if (success == NO) {
       gnunet_util_sleep(100 * cronMILLIS);
-      continue;    
+      continue;
     }
     if (ret <= 0)
       break; /* end of transmission or error */
-    if ((c=='\r') || (c=='\n')) 
+    if ((c=='\r') || (c=='\n'))
       curpos += ret;
-    else 
-      curpos=0;    
+    else
+      curpos=0;
   }
 
   if (curpos < 4) { /* we have not found it */
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("Parsing HTTP response for URL '%s' failed.\n"),
        url);
     CLOSE(sock);
@@ -189,7 +189,7 @@
   buffer = MALLOC(MAX_BUFFER_SIZE);
   while (1) {
     HELO_Message * helo;
-    
+
     helo = (HELO_Message*) &buffer[0];
     helo->header.type = htons(p2p_PROTO_HELO);
 
@@ -203,13 +203,13 @@
       success = RECV_NONBLOCKING(sock,
                                 &((char*)helo)[curpos],
                                 HELO_Message_size(helo)-curpos,
-                                &ret);      
+                                &ret);
       if ( success == NO )
        continue;
       if (ret <= 0)
        break; /* end of file or error*/
-      if (HELO_Message_size(helo) >= MAX_BUFFER_SIZE) 
-       break; /* INVALID! Avoid overflow! */      
+      if (HELO_Message_size(helo) >= MAX_BUFFER_SIZE)
+       break; /* INVALID! Avoid overflow! */
       curpos += ret;
     }
     if (curpos != HELO_Message_size(helo)) {
@@ -223,9 +223,9 @@
     callback(helo,
             arg);
   }
-    
+
   FREE(buffer);
-  CLOSE(sock);  
+  CLOSE(sock);
 }
 
 
@@ -234,16 +234,16 @@
   char * url;
   int i;
   int cnt;
- 
+
   url = getConfigurationString("GNUNETD",
                               "HOSTLISTURL");
-  if (url == NULL) 
-    return;  
+  if (url == NULL)
+    return;
   cnt = 1;
   i = strlen(url);
   while (i > 0) {
     i--;
-    if (url[i] == ' ') 
+    if (url[i] == ' ')
       cnt++;
   }
   cnt = randomi(cnt); /* pick random hostlist of the pack */
@@ -261,7 +261,7 @@
                             arg);
       return;
     }
-  } 
+  }
   downloadHostlistHelper(&url[0],
                         callback,
                         arg);
@@ -269,23 +269,23 @@
 }
 
 
-Bootstrap_ServiceAPI * 
+Bootstrap_ServiceAPI *
 provide_module_bootstrap(CoreAPIForApplication * capi) {
   static Bootstrap_ServiceAPI api;
   char *proxy, *proxyPort;
   struct hostent *ip;
 
-  proxy = getConfigurationString("GNUNETD", 
+  proxy = getConfigurationString("GNUNETD",
                                 "HTTP-PROXY");
   if (proxy != NULL) {
     ip = GETHOSTBYNAME(proxy);
     if (ip == NULL) {
-      LOG(LOG_ERROR, 
+      LOG(LOG_ERROR,
          _("Could not resolve name of HTTP proxy '%s'. Trying without a 
proxy.\n"),
          proxy);
       theProxy.sin_addr.s_addr = 0;
     } else {
-      theProxy.sin_addr.s_addr 
+      theProxy.sin_addr.s_addr
        = ((struct in_addr *)ip->h_addr)->s_addr;
       proxyPort = getConfigurationString("GNUNETD",
                                         "HTTP-PROXY-PORT");

Modified: GNUnet/src/applications/chat/chat.c
===================================================================
--- GNUnet/src/applications/chat/chat.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/applications/chat/chat.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -44,8 +44,8 @@
 static void markSeen(HashCode512 * hc) {
   if (++ringIndex >= MAX_LAST_MESSAGES)
     ringIndex = 0;
-  memcpy(&lastMsgs[ringIndex], 
-        hc, 
+  memcpy(&lastMsgs[ringIndex],
+        hc,
         sizeof(HashCode512));
 }
 
@@ -99,15 +99,15 @@
   for (i=0;i<MAX_LAST_MESSAGES;i++)
     if (equalsHashCode512(&hc, &lastMsgs[i]))
       j = i;
-  if (j == -1) { 
+  if (j == -1) {
     /* we have not seen it before, send to all TCP clients
        and broadcast to all peers */
-    markSeen(&hc); 
+    markSeen(&hc);
     for (j=0;j<clientCount;j++)
       coreAPI->sendToClient(clients[j],
                    &cmsg->header);
     broadcastToConnected(message, 5, 1);
-    pmsg->nick[CHAT_NICK_LENGTH-1] = '\0'; 
+    pmsg->nick[CHAT_NICK_LENGTH-1] = '\0';
     pmsg->message[CHAT_MSG_LENGTH-1] = '\0';
     /*
     LOG(LOG_DEBUG,
@@ -144,9 +144,9 @@
   /* forward to all other TCP chat clients */
   j = -1; /* marker to check if this is a new client */
   for (i=0;i<clientCount;i++)
-    if (clients[i] == client) 
+    if (clients[i] == client)
       j = i;
-    else 
+    else
       coreAPI->sendToClient(clients[i],
                    message);
   if (j == -1) {

Modified: GNUnet/src/applications/chat/chat.h
===================================================================
--- GNUnet/src/applications/chat/chat.h 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/applications/chat/chat.h 2005-03-20 23:54:53 UTC (rev 464)
@@ -31,7 +31,7 @@
 #define CHAT_MSG_LENGTH 1024
 
 typedef struct {
-  p2p_HEADER header; 
+  p2p_HEADER header;
   char nick[CHAT_NICK_LENGTH];
   char message[CHAT_MSG_LENGTH];
 } CHAT_p2p_MESSAGE;
@@ -39,7 +39,7 @@
 typedef struct {
   CS_HEADER header;
   char nick[CHAT_NICK_LENGTH];
-  char message[CHAT_MSG_LENGTH];  
+  char message[CHAT_MSG_LENGTH];
 } CHAT_CS_MESSAGE;
 
 

Modified: GNUnet/src/applications/chat/gnunet-chat.c
===================================================================
--- GNUnet/src/applications/chat/gnunet-chat.c  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/chat/gnunet-chat.c  2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/chat/gnunet-chat.c 
+ * @file applications/chat/gnunet-chat.c
  * @brief Chat command line tool
  * @author Christian Grothoff
  */
@@ -36,13 +36,13 @@
  * Parse the options, set the timeout.
  * @param argc the number of options
  * @param argv the option list (including keywords)
- * @return OK on error, SYSERR if we should exit 
+ * @return OK on error, SYSERR if we should exit
  */
 static int parseOptions(int argc,
                        char ** argv) {
   int option_index;
-  int c;  
-  
+  int c;
+
   FREENONNULL(setConfigurationString("GNUNETD",
                                     "LOGFILE",
                                     NULL));
@@ -51,14 +51,14 @@
       LONG_DEFAULT_OPTIONS,
       { "nickname", 1, 0, 'n' },
       { 0,0,0,0 }
-    };    
+    };
     option_index=0;
     c = GNgetopt_long(argc,
-                     argv, 
-                     "vhdc:L:H:n:", 
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     argv,
+                     "vhdc:L:H:n:",
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
@@ -68,7 +68,7 @@
                                         "NICK",
                                         GNoptarg));
       break;
-    case 'v': 
+    case 'v':
       printf("GNUnet v%s, gnunet-chat v%s\n",
             VERSION,
             CHAT_VERSION);
@@ -88,7 +88,7 @@
                 help);
       return SYSERR;
     }
-    default: 
+    default:
       LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
       return -1;
@@ -101,12 +101,12 @@
   CHAT_CS_MESSAGE * buffer;
 
   buffer = MALLOC(MAX_BUFFER_SIZE);
-  while (OK == readFromSocket(sock, 
+  while (OK == readFromSocket(sock,
                              (CS_HEADER **)&buffer)) {
     char timebuf[64];
     time_t timetmp;
     struct tm * tmptr;
-           
+       
     time(&timetmp);
     tmptr = localtime(&timetmp);
     strftime(timebuf,
@@ -117,7 +117,7 @@
    if ( (ntohs(buffer->header.size) != sizeof(CHAT_CS_MESSAGE)) ||
         (ntohs(buffer->header.type) != CHAT_CS_PROTO_MSG) )
       continue;
-    buffer->nick[CHAT_NICK_LENGTH-1] = '\0'; 
+    buffer->nick[CHAT_NICK_LENGTH-1] = '\0';
     buffer->message[CHAT_MSG_LENGTH-1] = '\0';
     printf("[%s][%s]: %s",
            timebuf,
@@ -134,7 +134,7 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return return value from gnunetsearch: 0: ok, -1: error
- */   
+ */
 int main(int argc, char ** argv) {
   GNUNET_TCP_SOCKET * sock;
   PTHREAD_T messageReceiveThread;
@@ -143,31 +143,31 @@
   char * nick;
 
   if (SYSERR == initUtil(argc, argv, &parseOptions))
-    return 0; /* parse error, --help, etc. */ 
+    return 0; /* parse error, --help, etc. */
   sock = getClientSocket();
   if (sock == NULL)
     errexit(_("Could not connect to gnunetd.\n"));
 
   nick = getConfigurationString("GNUNET-CHAT", "NICK");
-  if (nick == NULL) 
+  if (nick == NULL)
     errexit(_("You must specify a nickname (use option '%s').\n"),
-           "-n");  
+           "-n");
 
   doneSem = SEMAPHORE_NEW(0);
-  PTHREAD_CREATE(&messageReceiveThread, 
-                (PThreadMain) &receiveThread, 
+  PTHREAD_CREATE(&messageReceiveThread,
+                (PThreadMain) &receiveThread,
                 sock,
                 128 * 1024);
 
-  memset(&msg, 
-        0, 
+  memset(&msg,
+        0,
         sizeof(CHAT_CS_MESSAGE));
-  memcpy(&msg.message[0], 
-        "Hi!\n", 
+  memcpy(&msg.message[0],
+        "Hi!\n",
         strlen("Hi!\n"));
-  msg.header.size 
+  msg.header.size
     = htons(sizeof(CHAT_CS_MESSAGE));
-  msg.header.type 
+  msg.header.type
     = htons(CHAT_CS_PROTO_MSG);
   memcpy(&msg.nick[0],
         nick,

Modified: GNUnet/src/applications/datastore/datastore.c
===================================================================
--- GNUnet/src/applications/datastore/datastore.c       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/datastore/datastore.c       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -20,7 +20,7 @@
 
 /**
  * @file applications/datastore/datastore.c
- * @brief This module is responsible to manage content, in particular 
+ * @brief This module is responsible to manage content, in particular
  *        it needs to decide what content to keep.  This module
  *        also uses the bloomfilter to reduce get operations on the
  *        database.
@@ -92,7 +92,7 @@
 
 /**
  * Explicitly remove some content from the database.
- */  
+ */
 static int del(const HashCode512 * query,
               const Datastore_Value * value) {
   int ok;
@@ -112,7 +112,7 @@
   ok = sq->del(query, value);
   if (0 < ok) {
     for (i=0;i<ok;i++) {
-      makeUnavailable(query); /* update filter! */ 
+      makeUnavailable(query); /* update filter! */
       available += ntohl(value->size);
     }
     IFLOG(LOG_DEBUG,
@@ -135,7 +135,7 @@
 /**
  * Store an item in the datastore.  If the item is
  * already present, a second copy is created.
- *  
+ *
  * @return YES on success, NO if the datastore is
  *   full and the priority of the item is not high enough
  *   to justify removing something else, SYSERR on
@@ -154,7 +154,7 @@
     minPriority = ntohl(value->prio);
 
   /* add the content */
-  ok = sq->put(key, 
+  ok = sq->put(key,
               value);
   if (ok == YES) {
     makeAvailable(key);
@@ -184,7 +184,7 @@
  * Store an item in the datastore.  If the item is already present,
  * the priorities are summed up and the higher expiration time and
  * lower anonymity level is used.
- *  
+ *
  * @return YES on success, NO if the datastore is
  *   full and the priority of the item is not high enough
  *   to justify removing something else, SYSERR on
@@ -203,25 +203,25 @@
          ntohl(value->type),
          (Datum_Iterator) &checkExists,
          &cls);
-  if (ntohl(value->type) == D_BLOCK) 
+  if (ntohl(value->type) == D_BLOCK)
     sq->get(key,
            ONDEMAND_BLOCK,
            (Datum_Iterator) &checkExists,
            &cls);
-   
+
   if (cls.exists) {
     if (htonl(value->prio) == 0) {
       FREE(cls.existing);
       return OK;
     }
     /* update prio */
-    sq->update(key, 
+    sq->update(key,
               cls.existing,
               ntohl(value->prio));
     FREE(cls.existing);
     return OK;
   }
-  
+
   /* check if we have enough space / priority */
   if ( (available < ntohl(value->size) ) &&
        (minPriority > ntohl(value->prio)) )
@@ -231,7 +231,7 @@
     minPriority = ntohl(value->prio);
 
   /* add the content */
-  ok = sq->put(key, 
+  ok = sq->put(key,
               value);
   if (ok == YES) {
     makeAvailable(key);
@@ -241,9 +241,9 @@
 }
 
 static int freeSpaceExpired(const HashCode512 * key,
-                        const Datastore_Value * value, 
+                        const Datastore_Value * value,
                         void * closure) {
-  int ret; 
+  int ret;
 
   if (cronTime(NULL) < ntohll(value->expirationTime))
     return SYSERR; /* not expired */
@@ -256,9 +256,9 @@
 }
 
 static int freeSpaceLow(const HashCode512 * key,
-                       const Datastore_Value * value, 
+                       const Datastore_Value * value,
                        void * closure) {
-  int ret; 
+  int ret;
 
   minPriority = ntohl(value->prio);
   ret = sq->del(key, value);
@@ -276,7 +276,7 @@
  * Also updates available and minPriority.
  */
 static void cronMaintenance(void * unused) {
-  long long tmpAvailable 
+  long long tmpAvailable
     = getConfigurationInt("FS", "QUOTA") * 1024 * 1024; /* MB to bytes */
   available = tmpAvailable - sq->getSize();
   if (available < MIN_FREE) {
@@ -290,13 +290,13 @@
     }
   } else {
     minPriority = 0;
-  }  
+  }
 }
 
 /**
  * Initialize the manager-module.
- */ 
-Datastore_ServiceAPI * 
+ */
+Datastore_ServiceAPI *
 provide_module_datastore(CoreAPIForApplication * capi) {
   static Datastore_ServiceAPI api;
   int quota;
@@ -320,7 +320,7 @@
   addCronJob(&cronMaintenance,
             10 * cronSECONDS,
             10 * cronSECONDS,
-            NULL); 
+            NULL);
 
   api.getSize = &getSize;
   api.put = &put;
@@ -338,7 +338,7 @@
 void release_module_datastore() {
   delCronJob(&cronMaintenance,
             10 * cronSECONDS,
-            NULL); 
+            NULL);
   donePrefetch();
   doneFilters();
   coreAPI->releaseService(sq);
@@ -351,7 +351,7 @@
  * bloomfilter.
  */
 static int filterAddAll(const HashCode512 * key,
-                       const Datastore_Value * value, 
+                       const Datastore_Value * value,
                        void * closure) {
   makeAvailable(key);
   return OK;
@@ -371,7 +371,7 @@
     = getConfigurationInt("FS", "QUOTA");
   lq = NULL;
   if (sizeof(int) != stateReadContent("FS-LAST-QUOTA",
-                                     (void**)&lq)) 
+                                     (void**)&lq))
     return; /* first start? */
   lastQuota = ntohl(*lq);
   FREE(lq);
@@ -379,11 +379,11 @@
     return; /* unchanged */
   /* ok, need to convert! */
   deleteFilter();
-  initFilters();  
+  initFilters();
   sq = uapi->requestService("sqstore");
   sq->get(NULL, ANY_BLOCK,
          &filterAddAll,
-         NULL);  
+         NULL);
   uapi->releaseService(sq);
   sq = NULL;
   doneFilters();

Modified: GNUnet/src/applications/datastore/filter.c
===================================================================
--- GNUnet/src/applications/datastore/filter.c  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/datastore/filter.c  2005-03-20 23:54:53 UTC (rev 
464)
@@ -62,9 +62,9 @@
   qt = NULL;
   quota = getConfigurationInt("FS",
                              "QUOTA") * 1024;
- 
+
   bf_size = quota/8; /* 8 bit per entry, 1 bit per kb in DB */
-  filter 
+  filter
     = loadBloomfilter(bf,
                      bf_size,
                      5); /* approx. 3% false positives at max use */

Modified: GNUnet/src/applications/datastore/prefetch.c
===================================================================
--- GNUnet/src/applications/datastore/prefetch.c        2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/datastore/prefetch.c        2005-03-20 23:54:53 UTC 
(rev 464)
@@ -72,7 +72,7 @@
 
 
 static int aquire(const HashCode512 * key,
-                 const Datastore_Value * value, 
+                 const Datastore_Value * value,
                  void * closure) {
   int load;
 
@@ -90,7 +90,7 @@
         ntohl(value->size));
   rCBPos++;
   MUTEX_UNLOCK(&lock);
-  load = getCPULoad(); /* FIXME: should use 'IO load' here */      
+  load = getCPULoad(); /* FIXME: should use 'IO load' here */
   if (load < 10)
     load = 10;    /* never sleep less than 500 ms */
   if (load > 100)
@@ -98,7 +98,7 @@
                     might show up badly in the shutdown sequence... */
   if (doneSignal != NULL)
     return SYSERR;
-  /* the higher the load, the longer the sleep */ 
+  /* the higher the load, the longer the sleep */
   gnunet_util_sleep(50 * cronMILLIS * load);
   if (doneSignal != NULL)
     return SYSERR;
@@ -116,7 +116,7 @@
                              NULL);
     /* sleep here, too - otherwise we start looping immediately
        if there is no content in the DB! */
-    load = getCPULoad(); 
+    load = getCPULoad();
     if (load < 10)
       load = 10;    /* never sleep less than 500 ms */
     if (load > 100)
@@ -143,7 +143,7 @@
   unsigned int minDist;
   int minIdx;
   int i;
-  
+
   minIdx = -1;
   minDist = -1; /* max */
   MUTEX_LOCK(&lock);
@@ -156,7 +156,7 @@
     if (dist < minDist) {
       minIdx = i;
       minDist = dist;
-    }    
+    }
   }
   if (minIdx == -1) {
     MUTEX_UNLOCK(&lock);
@@ -164,19 +164,19 @@
   }
   *key = randomContentBuffer[minIdx].key;
   *value = randomContentBuffer[minIdx].value;
-  
-  randomContentBuffer[minIdx] 
+
+  randomContentBuffer[minIdx]
     = randomContentBuffer[rCBPos];
   randomContentBuffer[rCBPos].value = NULL;
   MUTEX_UNLOCK(&lock);
   SEMAPHORE_UP(acquireMoreSignal);
   return OK;
 }
-                                 
+                               
 void initPrefetch(SQstore_ServiceAPI * s) {
   sq = s;
   memset(&randomContentBuffer,
-        0, 
+        0,
         sizeof(ContentBuffer *)*RCB_SIZE);
   acquireMoreSignal = SEMAPHORE_NEW(RCB_SIZE);
   doneSignal = NULL;
@@ -184,7 +184,7 @@
   if (0 != PTHREAD_CREATE(&gather_thread,
                          (PThreadMain)&rcbAcquire,
                          NULL,
-                         64*1024)) 
+                         64*1024))
     DIE_STRERROR("pthread_create");
 }
 
@@ -198,7 +198,7 @@
   SEMAPHORE_FREE(acquireMoreSignal);
   SEMAPHORE_FREE(doneSignal);
   MUTEX_DESTROY(&lock);
-  for (i=0;i<rCBPos;i++) 
+  for (i=0;i<rCBPos;i++)
     FREENONNULL(randomContentBuffer[i].value);
   PTHREAD_JOIN(&gather_thread, &unused);
 }

Modified: GNUnet/src/applications/dht/module/cs.c
===================================================================
--- GNUnet/src/applications/dht/module/cs.c     2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/dht/module/cs.c     2005-03-20 23:54:53 UTC (rev 
464)
@@ -16,7 +16,7 @@
       Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       Boston, MA 02111-1307, USA.
  */
- 
+
 /**
  * @file module/cs.c
  * @brief DHT application protocol using the DHT service.
@@ -178,10 +178,10 @@
   handlers->resultCallback = resultCallback;
   handlers->resultCallbackClosure = resCallbackClosure;
   handlers->status = 0;
-  size = sizeof(DHT_CS_REQUEST_GET) + 
+  size = sizeof(DHT_CS_REQUEST_GET) +
     (keyCount-1) * sizeof(HashCode512);
-  if (((unsigned int)size) 
-      != sizeof(DHT_CS_REQUEST_GET) + 
+  if (((unsigned int)size)
+      != sizeof(DHT_CS_REQUEST_GET) +
       (keyCount-1) * sizeof(HashCode512)) {
     SEMAPHORE_UP(handlers->prerequest);
     return SYSERR; /* too many keys, size > rangeof(short) */
@@ -208,7 +208,7 @@
   SEMAPHORE_UP(handlers->prerequest);
   return ret;
 }
-  
+
 /**
  * Store an item in the datastore.
  *
@@ -225,7 +225,7 @@
   CS_TableHandlers * handlers = closure;
   int ret;
   size_t n;
-  
+
   n = sizeof(DHT_CS_REQUEST_PUT) + ntohl(value->size);
   req = MALLOC(n);
   SEMAPHORE_DOWN(handlers->prerequest);
@@ -271,7 +271,7 @@
   CS_TableHandlers * handlers = closure;
   int ret;
   size_t n;
-  
+
   n = sizeof(DHT_CS_REQUEST_REMOVE);
   if (value != NULL)
     n += htonl(value->size);
@@ -308,13 +308,13 @@
  * @param cls argument to processor
  * @return number of results, SYSERR on error
  */
-static int tcp_iterate(void * closure,          
+static int tcp_iterate(void * closure,         
                       DataProcessor processor,
                       void * cls) {
   DHT_CS_REQUEST_ITERATE req;
   CS_TableHandlers * handlers = closure;
   int ret;
-  
+
   SEMAPHORE_DOWN(handlers->prerequest);
   handlers->status = 0;
   handlers->resultCallback = processor;
@@ -379,7 +379,7 @@
     GROW(csHandlers,
         csHandlersCount,
         csHandlersCount+1);
-    csHandlers[csHandlersCount-1] = ptr;    
+    csHandlers[csHandlersCount-1] = ptr;
   } else {
     SEMAPHORE_FREE(ptr->prerequest);
     SEMAPHORE_FREE(ptr->prereply);
@@ -390,7 +390,7 @@
   ret = sendAck(client,
                &req->table,
                ret);
-  MUTEX_UNLOCK(&csLock);  
+  MUTEX_UNLOCK(&csLock);
   return ret;
 }
 
@@ -413,7 +413,7 @@
   MUTEX_LOCK(&csLock);
   for (i=0;i<csHandlersCount;i++) {
     if ( (equalsHashCode512(&csHandlers[i]->table,
-                           &req->table)) ) {     
+                           &req->table)) ) {
       if (OK != dhtAPI->leave(&req->table,
                              ntohll(req->timeout))) {
        LOG(LOG_WARNING,
@@ -462,16 +462,16 @@
        _("'%s' failed.  Terminating connection to client.\n"),
        "sendAck");
     coreAPI->terminateClientConnection(record->client);
-  }    
+  }
   for (i=putRecordsSize-1;i>=0;i--)
     if (putRecords[i] == record) {
-      putRecords[i] = putRecords[putRecordsSize-1];      
+      putRecords[i] = putRecords[putRecordsSize-1];
       GROW(putRecords,
           putRecordsSize,
           putRecordsSize-1);
       break;
     }
-  MUTEX_UNLOCK(&csLock);   
+  MUTEX_UNLOCK(&csLock);
   FREE(record);
 }
 
@@ -493,7 +493,7 @@
   req = cpc->message;
   client = cpc->client;
   FREE(cpc);
-  size = ntohs(req->header.size) 
+  size = ntohs(req->header.size)
     - sizeof(DHT_CS_REQUEST_PUT)
     + sizeof(DataContainer);
   GNUNET_ASSERT(size < 0xFFFF);
@@ -560,18 +560,18 @@
     LOG(LOG_FAILURE,
        _("sendAck failed.  Terminating connection to client.\n"));
     coreAPI->terminateClientConnection(record->client);
-  }    
+  }
   MUTEX_LOCK(&csLock);
   for (i=removeRecordsSize-1;i>=0;i--)
     if (removeRecords[i] == record) {
-      removeRecords[i] = removeRecords[removeRecordsSize-1];      
+      removeRecords[i] = removeRecords[removeRecordsSize-1];
       GROW(removeRecords,
           removeRecordsSize,
           removeRecordsSize-1);
       break;
     }
   MUTEX_UNLOCK(&csLock);
-   
+
   FREE(record);
 }
 
@@ -593,7 +593,7 @@
   req = cpc->message;
   client = cpc->client;
   FREE(cpc);
-  size = ntohs(req->header.size) 
+  size = ntohs(req->header.size)
     - sizeof(DHT_CS_REQUEST_REMOVE)
     + sizeof(DataContainer);
   GNUNET_ASSERT(size < 0xFFFF);
@@ -656,7 +656,7 @@
                                  CS_GET_RECORD * record) {
   DHT_CS_REPLY_RESULTS * msg;
   size_t n;
-  
+
   n = sizeof(DHT_CS_REPLY_RESULTS) + ntohl(value->size);
   msg = MALLOC(n);
   msg->key = *key;
@@ -681,7 +681,7 @@
   FREE(msg);
   return OK;
 }
-                                  
+                               
 static void cs_get_abort(CS_GET_RECORD * record) {
   int i;
 
@@ -694,7 +694,7 @@
          _("'%s' failed. Terminating connection to client.\n"),
          "sendAck");
       coreAPI->terminateClientConnection(record->client);
-    }   
+    }
   } else {
     if (OK != sendAck(record->client,
                      &record->table,
@@ -703,18 +703,18 @@
          _("'%s' failed. Terminating connection to client.\n"),
          "sendAck");
       coreAPI->terminateClientConnection(record->client);
-    }   
+    }
   }
   MUTEX_LOCK(&csLock);
   for (i=getRecordsSize-1;i>=0;i--)
     if (getRecords[i] == record) {
-      getRecords[i] = getRecords[getRecordsSize-1];      
+      getRecords[i] = getRecords[getRecordsSize-1];
       GROW(getRecords,
           getRecordsSize,
           getRecordsSize-1);
       break;
     }
-  MUTEX_UNLOCK(&csLock);   
+  MUTEX_UNLOCK(&csLock);
   FREE(record);
 }
 
@@ -735,7 +735,7 @@
   client = cpc->client;
   req = cpc->message;
   FREE(cpc);
-  
+
   keyCount = 1 + ((ntohs(req->header.size) - sizeof(DHT_CS_REQUEST_GET)) / 
sizeof(HashCode512));
   ptr = MALLOC(sizeof(CS_GET_RECORD));
   ptr->client = client;
@@ -805,7 +805,7 @@
   for (i=0;i<csHandlersCount;i++) {
     if ( (csHandlers[i]->handler == client) &&
         (equalsHashCode512(&csHandlers[i]->table,
-                           &req->table)) ) {     
+                           &req->table)) ) {
       SEMAPHORE_DOWN(ptr->postreply);
       ptr = csHandlers[i];
       ptr->status = ntohl(req->status);
@@ -845,12 +845,12 @@
   }
   LOG(LOG_EVERYTHING,
       "'%s' received from client.\n",
-      "DHT_CS_REPLY_RESULTS");  
+      "DHT_CS_REPLY_RESULTS");
   MUTEX_LOCK(&csLock);
   for (i=0;i<csHandlersCount;i++) {
     if ( (csHandlers[i]->handler == client) &&
         (equalsHashCode512(&csHandlers[i]->table,
-                           &req->table)) ) {     
+                           &req->table)) ) {
       ptr = csHandlers[i];
       SEMAPHORE_DOWN(ptr->postreply);
       LOG(LOG_EVERYTHING,
@@ -858,9 +858,9 @@
          __FUNCTION__,
          dataLength - sizeof(DataContainer),
          &(&req->data)[1]);
-      
+
       ptr->resultCallback(&req->key,
-                         &req->data,                     
+                         &req->data,                   
                          ptr->resultCallbackClosure);
       ptr->status++;
       MUTEX_UNLOCK(&csLock);
@@ -871,7 +871,7 @@
   LOG(LOG_ERROR,
       _("Failed to deliver '%s' message.\n"),
       "DHT_CS_REPLY_RESULTS");
-  return SYSERR; /* failed to deliver */ 
+  return SYSERR; /* failed to deliver */
 }
 
 /**
@@ -958,7 +958,7 @@
   if (dhtAPI == NULL)
     return SYSERR;
   coreAPI = capi;
-  LOG(LOG_DEBUG, 
+  LOG(LOG_DEBUG,
       "DHT registering client handlers: "
       "%d %d %d %d %d %d %d\n",
       DHT_CS_PROTO_REQUEST_JOIN,
@@ -1003,7 +1003,7 @@
   int status;
 
   status = OK;
-  LOG(LOG_DEBUG, 
+  LOG(LOG_DEBUG,
       "DHT: shutdown\n");
   if (OK != coreAPI->unregisterClientHandler(DHT_CS_PROTO_REQUEST_JOIN,
                                             &csJoin))
@@ -1051,7 +1051,7 @@
   }
 
   /* simulate client-exit for all existing handlers */
-  while (csHandlersCount > 0) 
+  while (csHandlersCount > 0)
     csClientExit(csHandlers[0]->handler);
   coreAPI->releaseService(dhtAPI);
   dhtAPI = NULL;

Modified: GNUnet/src/applications/dht/module/datastore_dht_master.c
===================================================================
--- GNUnet/src/applications/dht/module/datastore_dht_master.c   2005-03-20 
23:31:34 UTC (rev 463)
+++ GNUnet/src/applications/dht/module/datastore_dht_master.c   2005-03-20 
23:54:53 UTC (rev 464)
@@ -10,16 +10,16 @@
       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 GNUnet; see the file COPYING.  If not, write to the
       Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       Boston, MA 02111-1307, USA.
  */
- 
+
 /**
  * @file applications/dht/module/datastore_dht_master.c
- * @brief provides the implementation of the 
+ * @brief provides the implementation of the
  * Blockstore API for the DHT master table; based on
  * datastore_memory.c.
  * @author Simo Viitanen, Christian Grothoff
@@ -46,8 +46,8 @@
 } MasterEntry;
 
 /**
- * @brief datastructure for one entry in the table. 
- */ 
+ * @brief datastructure for one entry in the table.
+ */
 typedef struct HT_Entry_t {
   struct HT_Entry_t * next;
   HashCode512 key;
@@ -57,7 +57,7 @@
 
 /**
  * @brief the per-table data
- */ 
+ */
 typedef struct {
   Mutex lock;
   size_t max_memory;
@@ -99,7 +99,7 @@
        count = prio;
       else
        count = pos->count;
-      if (count < pos->count) 
+      if (count < pos->count)
        perm = permute(pos->count); /* randomize returned set! */
       else
        perm = NULL;
@@ -110,9 +110,9 @@
          j = i;
        else
          j = perm[i];
-       data = MALLOC(sizeof(DataContainer) + 
+       data = MALLOC(sizeof(DataContainer) +
                      sizeof(HashCode512));
-       data->size = htonl(sizeof(DataContainer) + 
+       data->size = htonl(sizeof(DataContainer) +
                           sizeof(HashCode512));
        memcpy(&data[1],
               &pos->values[j].hash,
@@ -131,14 +131,14 @@
   MUTEX_UNLOCK(&ds->lock);
   return 0;
 }
-  
+
 /**
  * Store an item in the datastore.
  *
  * @param key the key of the item
- * @param value the value to store, must be of size HashCode512 for 
+ * @param value the value to store, must be of size HashCode512 for
  *        the master table!
- * @return OK if the value could be stored, SYSERR if not, 
+ * @return OK if the value could be stored, SYSERR if not,
  *         NO for out of space)
  */
 static int store(void * closure,
@@ -151,7 +151,7 @@
 
   if ( (ds == NULL) || (value == NULL) )
     return SYSERR;
-  if (ntohl(value->size) - sizeof(DataContainer) 
+  if (ntohl(value->size) - sizeof(DataContainer)
       != sizeof(HashCode512))
     return SYSERR;
 
@@ -173,12 +173,12 @@
       ds->max_memory -= sizeof(MasterEntry);
       GROW(pos->values,
           pos->count,
-          pos->count+1);      
+          pos->count+1);
       pos->values[pos->count-1].lastRefreshTime = cronTime(NULL);
       memcpy(&pos->values[pos->count-1].hash,
             &value[1],
             sizeof(HashCode512));
-      MUTEX_UNLOCK(&ds->lock);  
+      MUTEX_UNLOCK(&ds->lock);
       return OK;
     } /* end key match */
     pos = pos->next;
@@ -220,7 +220,7 @@
   if (ds == NULL)
     return SYSERR;
   if ( (value != NULL) &&
-       (ntohl(value->size) - sizeof(DataContainer) 
+       (ntohl(value->size) - sizeof(DataContainer)
        != sizeof(HashCode512)) )
     return SYSERR;
 
@@ -245,7 +245,7 @@
              else
                prev->next = pos->next;
              FREE(pos);
-             ds->max_memory += sizeof(HT_Entry);             
+             ds->max_memory += sizeof(HT_Entry);       
            }
            MUTEX_UNLOCK(&ds->lock);
            return OK;
@@ -282,7 +282,7 @@
  * @param cls argument to processor
  * @return number of results, SYSERR on error
  */
-static int iterate(void * closure,              
+static int iterate(void * closure,             
                   DataProcessor processor,
                   void * cls) {
   MemoryDatastore * ds = (MemoryDatastore*) closure;
@@ -329,7 +329,7 @@
   cron_t now;
 
   prev = NULL;
-  MUTEX_LOCK(&store->lock);  
+  MUTEX_LOCK(&store->lock);
   cronTime(&now);
   pos = store->first;
   while (pos != NULL) {
@@ -338,7 +338,7 @@
        pos->values[i] = pos->values[pos->count-1];
        GROW(pos->values,
             pos->count,
-            pos->count-1);    
+            pos->count-1);
        store->max_memory += sizeof(MasterEntry);
       }
     }
@@ -397,7 +397,7 @@
 
   md  = ds->closure;
   icr = isCronRunning();
-  if (icr) 
+  if (icr)
     suspendCron();
   delCronJob((CronJob) &expirationJob,
             5 * cronMINUTES,

Modified: GNUnet/src/applications/dht/module/datastore_dht_master.h
===================================================================
--- GNUnet/src/applications/dht/module/datastore_dht_master.h   2005-03-20 
23:31:34 UTC (rev 463)
+++ GNUnet/src/applications/dht/module/datastore_dht_master.h   2005-03-20 
23:54:53 UTC (rev 464)
@@ -10,16 +10,16 @@
       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 GNUnet; see the file COPYING.  If not, write to the
       Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       Boston, MA 02111-1307, USA.
  */
- 
+
 /**
  * @file applications/dht/module/datastore_dht_master.h
- * @brief provides the implementation of the 
+ * @brief provides the implementation of the
  * Blockstore API for keeping the table data in memory.
  * @author Simo Viitanen, Christian Grothoff
  */

Modified: GNUnet/src/applications/dht/module/datastore_memory.c
===================================================================
--- GNUnet/src/applications/dht/module/datastore_memory.c       2005-03-20 
23:31:34 UTC (rev 463)
+++ GNUnet/src/applications/dht/module/datastore_memory.c       2005-03-20 
23:54:53 UTC (rev 464)
@@ -10,21 +10,21 @@
       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 GNUnet; see the file COPYING.  If not, write to the
       Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       Boston, MA 02111-1307, USA.
  */
- 
+
 /**
  * @file applications/dht/module/datastore_memory.c
- * @brief provides the implementation of the 
- * 
+ * @brief provides the implementation of the
+ *
  * Blockstore implementation for keeping the table
- * data in memory.  This implementation knows 
- * nothing about entry types or multiple keys.  
- * get calls must only use one key and types 
+ * data in memory.  This implementation knows
+ * nothing about entry types or multiple keys.
+ * get calls must only use one key and types
  * are always ignored.
  *
  * @author Simo Viitanen, Christian Grothoff
@@ -35,8 +35,8 @@
 #include "platform.h"
 
 /**
- * @brief datastructure for one entry in the table. 
- */ 
+ * @brief datastructure for one entry in the table.
+ */
 typedef struct HT_Entry_t {
   struct HT_Entry_t * next;
   HashCode512 key;
@@ -46,7 +46,7 @@
 
 /**
  * @brief the per-table data
- */ 
+ */
 typedef struct {
   Mutex lock;
   size_t max_memory;
@@ -100,7 +100,7 @@
   MUTEX_UNLOCK(&ds->lock);
   return 0;
 }
-  
+
 /**
  * Store an item in the datastore.
  *
@@ -138,7 +138,7 @@
       memcpy(pos->values[pos->count-1],
             value,
             size);
-      MUTEX_UNLOCK(&ds->lock);  
+      MUTEX_UNLOCK(&ds->lock);
       return OK;
     } /* end key match */
     pos = pos->next;
@@ -205,7 +205,7 @@
              else
                prev->next = pos->next;
              FREE(pos);
-             ds->max_memory += sizeof(HT_Entry);             
+             ds->max_memory += sizeof(HT_Entry);       
            }
            MUTEX_UNLOCK(&ds->lock);
            return OK;
@@ -245,7 +245,7 @@
  * @param cls argument to processor
  * @return number of results, SYSERR on error
  */
-static int iterate(void * closure,              
+static int iterate(void * closure,             
                   DataProcessor processor,
                   void * cls) {
   MemoryDatastore * ds = closure;
@@ -313,8 +313,8 @@
   pos = md->first;
   while (pos != NULL) {
     next = pos->next;
-    for (i=0;i<pos->count;i++) 
-      FREENONNULL(pos->values[i]);    
+    for (i=0;i<pos->count;i++)
+      FREENONNULL(pos->values[i]);
     FREE(pos->values);
     FREE(pos);
     pos = next;

Modified: GNUnet/src/applications/dht/module/datastore_memory_test.c
===================================================================
--- GNUnet/src/applications/dht/module/datastore_memory_test.c  2005-03-20 
23:31:34 UTC (rev 463)
+++ GNUnet/src/applications/dht/module/datastore_memory_test.c  2005-03-20 
23:54:53 UTC (rev 464)
@@ -10,7 +10,7 @@
       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 GNUnet; see the file COPYING.  If not, write to the
       Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -30,7 +30,7 @@
 #include "gnunet_dht_datastore_memory.h"
 #include "gnunet_dht_service.h"
 
-#define DUMP(v) fprintf(stderr, "At %d: \n", __LINE__); 
+#define DUMP(v) fprintf(stderr, "At %d: \n", __LINE__);
 
 static int store(Blockstore * s,
                 char * key,
@@ -49,11 +49,11 @@
   if (OK != s->put(s->closure,
                   &hc,
                   cont,
-                  0)) { 
-    DUMP(s); 
+                  0)) {
+    DUMP(s);
     FREE(cont);
     return 1;
-  }    
+  }
   FREE(cont);
   return 0;
 }
@@ -78,10 +78,10 @@
        &hc);
   if (OK != s->del(s->closure,
                   &hc,
-                  cont)) { 
+                  cont)) {
     FREE(cont);
-    DUMP(s); 
-    return 1; 
+    DUMP(s);
+    return 1;
   }
   FREE(cont);
   return 0;
@@ -117,8 +117,8 @@
                   &cont)) {
     if (val == NULL)
       return 0;
-    DUMP(s); 
-    return 1; 
+    DUMP(s);
+    return 1;
   } else if (val == NULL) {
     FREE(cont);
     DUMP(s);
@@ -162,9 +162,9 @@
 }
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   return OK;
 }
@@ -173,7 +173,7 @@
         char * argv[]) {
   Blockstore * s;
   int i;
-  
+
   initUtil(argc, argv, &parseCommandLine);
   s = create_blockstore_memory(65536);
   for (i=0;i<65536;i++)

Modified: GNUnet/src/applications/dht/module/dht.c
===================================================================
--- GNUnet/src/applications/dht/module/dht.c    2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/dht/module/dht.c    2005-03-20 23:54:53 UTC (rev 
464)
@@ -17,7 +17,7 @@
       Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       Boston, MA 02111-1307, USA.
  */
- 
+
 /**
  * @file module/dht.c
  * @brief definition of the entry points to the module; implements
@@ -26,7 +26,7 @@
  *   on kademlia.
  * @author Marko R�ih�, Christian Grothoff
  *
- * 
+ *
  * WARNING (to self): What follows is 3.500+ lines of incomplete,
  * crazy, recursive, asynchronous, multithreaded routing code with
  * plenty of function pointers, too little documentation and not
@@ -35,9 +35,9 @@
  *
  * Todo:
  * 1) document (lots!)
- *   
+ *
  * Desirable features:
- * 1) security: how to pick priorities?  Access rights? 
+ * 1) security: how to pick priorities?  Access rights?
  * 2) performance: add optional HELO messages
  */
 
@@ -84,7 +84,7 @@
 /**
  * How often should we notify the master-table about our
  * bucket status?
- */ 
+ */
 #define DHT_MAINTAIN_BUCKET_FREQUENCY (5 * cronMINUTES)
 
 /**
@@ -138,7 +138,7 @@
   cron_t lastTableRefresh;
   /**
    * What was the last time we send a PING to this peer?
-   */ 
+   */
   cron_t lastTimePingSend;
   /**
    * In which tables do we know that peer to participate in?
@@ -159,13 +159,13 @@
  */
 typedef struct {
   /**
-   * Peers in this bucket fall into the distance-range 
+   * Peers in this bucket fall into the distance-range
    * (2^bstart to 2^bend].
    */
   unsigned int bstart;
 
   /**
-   * Peers in this bucket fall into the distance-range 
+   * Peers in this bucket fall into the distance-range
    * (2^bstart to 2^bend].
    */
   unsigned int bend;
@@ -186,7 +186,7 @@
   /**
    * What was the last time we advertised this nodes participation in
    * this table to the master table?
-   */ 
+   */
   cron_t lastMasterAdvertisement;
 
   /**
@@ -203,9 +203,9 @@
 typedef struct {
   /**
    * Towards which key are we routing?
-   */ 
+   */
   HashCode512 key;
-  
+
   /**
    * In what table are we searching?
    */
@@ -226,7 +226,7 @@
    * Best k matches found so far.  Of size ALPHA.
    */
   HashCode512 * matches;
-  
+
   /**
    * Number of RPCs transmitted so far (if it reaches
    * rpcRepliesExpected we can possibly abort before
@@ -254,7 +254,7 @@
   /**
    * When do we need to be done (absolute time).
    */
-  cron_t timeout;  
+  cron_t timeout;
 
   /**
    * Lock for accessing this struct.
@@ -277,9 +277,9 @@
 typedef struct {
   /**
    * Towards which key are we routing?
-   */ 
+   */
   HashCode512 key;
-  
+
   /**
    * In what table are we searching?
    */
@@ -294,7 +294,7 @@
    * Number of entries found so far.
    */
   unsigned int found;
-  
+
   /**
    * Number of RPCs transmitted so far (if it reaches
    * rpcRepliesExpected we can possibly abort before
@@ -322,7 +322,7 @@
   /**
    * When do we need to be done (absolute time).
    */
-  cron_t timeout;  
+  cron_t timeout;
 
   /**
    * Lock for accessing this struct.
@@ -484,7 +484,7 @@
 
   /**
    * Callback to call upon completion.
-   */ 
+   */
   DHT_OP_Complete callback;
 
   /**
@@ -512,7 +512,7 @@
 
 typedef struct {
   DHT_TableId table;
-  cron_t timeout; 
+  cron_t timeout;
   unsigned int maxPuts;
   DHT_PUT_RECORD ** puts;
   unsigned int putsPos;
@@ -653,7 +653,7 @@
 /**
  * Total number of active buckets.
  */
-static unsigned int bucketCount;   
+static unsigned int bucketCount;
 
 /**
  * The ID of the master table.
@@ -722,7 +722,7 @@
            "[%4d: %3d-%3d]: %s with %u tables (%s, %s, %s)\n",
            i,
            buckets[i].bstart, buckets[i].bend,
-           &enc, 
+           &enc,
            pos->tableCount,
            &tabs[0],
            &tabs[1],
@@ -805,7 +805,7 @@
                                    key))
     return NO;
   else
-    return YES; 
+    return YES;
 }
 
 /**
@@ -827,7 +827,7 @@
       index = i;
       break;
     }
-  } 
+  }
 #if DEBUG_DHT
   hash2enc(&peer->hashPubKey,
           &enc1);
@@ -844,10 +844,10 @@
          (i > 0) ) {
     i--;
   }
-  if ( (buckets[i].bstart <  index) &&  
+  if ( (buckets[i].bstart <  index) &&
        (buckets[i].bend   >= index) ) {
     return &buckets[i];
-  } else {    
+  } else {
 #if DEBUG_DHT
     LOG(LOG_WARNING,
        "Index %d not in range for bucket %d which is [%d,%d[\n",
@@ -883,7 +883,7 @@
     (*k)++;
   } else {
     replace = -1;
-    for (m=limit-1;m>=0;m--) 
+    for (m=limit-1;m>=0;m--)
       if ( (1 == hashCodeCompareDistance(&kbest[m],
                                         newValue,
                                         key)) &&
@@ -897,7 +897,7 @@
             newValue,
             sizeof(HashCode512));
     }
-  }  
+  }
 }
 
 /**
@@ -915,8 +915,8 @@
   pos = vectorGetFirst(bucket->peers);
   while (pos != NULL) {
     if (equalsHashCode512(&peer->hashPubKey,
-                         &pos->id.hashPubKey)) 
-      return pos;    
+                         &pos->id.hashPubKey))
+      return pos;
     pos = vectorGetNext(bucket->peers);
   }
   return NULL;
@@ -955,9 +955,9 @@
          &enc);
       return;
     }
-    tables = (DHT_TableId*) data;  
+    tables = (DHT_TableId*) data;
     cronTime(&now);
-    
+
 #if DEBUG_DHT
     IFLOG(LOG_DEBUG,
          hash2enc(&responder->hashPubKey,
@@ -967,11 +967,11 @@
        &enc,
        tableCount);
 #endif
-    
+
     /* update buckets */
     MUTEX_LOCK(lock);
     pos = findPeerInfo(responder);
-    bucket = findBucket(responder); 
+    bucket = findBucket(responder);
     if (bucket == NULL) {
       IFLOG(LOG_WARNING,
            hash2enc(&responder->hashPubKey,
@@ -983,7 +983,7 @@
     GNUNET_ASSERT(bucket != NULL);
     if (pos == NULL) {
       PeerInfo * oldest = NULL;
-      
+
       pos = vectorGetFirst(bucket->peers);
       while (pos != NULL) {
        if (pos->lastActivity + DHT_INACTIVITY_DEATH < now) {
@@ -993,15 +993,15 @@
            if (pos->lastActivity < oldest->lastActivity)
              oldest = pos;
        }
-       if (pos->lastTableRefresh + 
+       if (pos->lastTableRefresh +
            (pos->tableCount - tableCount) * DHT_TABLE_FACTOR + 
DHT_HYPERACTIVE_TIME < now) {
          if (oldest == NULL)
            oldest = pos;
-         else if (pos->lastTableRefresh + 
+         else if (pos->lastTableRefresh +
                   (pos->tableCount - tableCount) * DHT_TABLE_FACTOR <
-                  oldest->lastTableRefresh + 
+                  oldest->lastTableRefresh +
                   (oldest->tableCount - tableCount) * DHT_TABLE_FACTOR)
-           oldest = pos; 
+           oldest = pos;
        }
        pos = vectorGetNext(bucket->peers);
       }
@@ -1034,7 +1034,7 @@
          "adding peer '%s' to routing table.\n",       
          &enc);
 #endif
-      
+
       pos->lastActivity = now;
       pos->lastTableRefresh = now;
       pos->id = *responder;
@@ -1049,7 +1049,7 @@
   }
 
   /* HERE: process other optional fields (HELOs) */
-  
+
 }
 
 /**
@@ -1112,8 +1112,8 @@
   /* update peer list */
   MUTEX_LOCK(lock);
   info = findPeerInfo(responder);
-  if (info != NULL) 
-    info->lastActivity = cronTime(NULL);   
+  if (info != NULL)
+    info->lastActivity = cronTime(NULL);
   MUTEX_UNLOCK(lock);
 
   if (OK != RPC_paramValueByName(results,
@@ -1129,8 +1129,8 @@
        &enc);
     return;
   }
-  
-  /* parse value, try to DHT-ping  the new peers 
+
+  /* parse value, try to DHT-ping  the new peers
      (to add it to the table; if that succeeds
      the peer will automatically trigger the ping_reply_handler
      which will in turn trigger create_find_nodes_rpc) */
@@ -1198,7 +1198,7 @@
   param = RPC_paramNew();
   MUTEX_LOCK(&fnc->lock);
   if (equalsHashCode512(&fnc->key,
-                       &coreAPI->myIdentity->hashPubKey)) {    
+                       &coreAPI->myIdentity->hashPubKey)) {
     table = getLocalTableData(&fnc->table);
     if (table != NULL)
       table->lastFindOperation = now;
@@ -1207,7 +1207,7 @@
               "table",
               sizeof(DHT_TableId),
               &fnc->table);
-              
+       
   RPC_paramAdd(param,
               "key",
               sizeof(HashCode512),
@@ -1222,12 +1222,12 @@
   addOptionalFields(param);
   fnc->rpc[fnc->rpcRepliesExpected-1]
     = rpcAPI->RPC_start(peer,
-                       "DHT_findNode", 
-                       param, 
-                       0, 
+                       "DHT_findNode",
+                       param,
+                       0,
                        rel,
-                       (RPC_Complete) 
&create_find_nodes_rpc_complete_callback, 
-                       fnc);  
+                       (RPC_Complete) &create_find_nodes_rpc_complete_callback,
+                       fnc);
   MUTEX_UNLOCK(&fnc->lock);
   RPC_paramFree(param);
 }
@@ -1263,7 +1263,7 @@
     if (i == -1)
       return; /* peer does not support table in question */
   }
-  
+
   /* update k-best list */
   MUTEX_LOCK(&fnc->lock);
 #if DEBUG_DHT
@@ -1292,7 +1292,7 @@
  * information.  Note that this is done asynchronously.
  */
 static void request_DHT_ping(const PeerIdentity * identity,
-                            FindNodesContext * fnc) {  
+                            FindNodesContext * fnc) {
   RPC_Param * request_param;
   PeerInfo * pos;
   cron_t now;
@@ -1330,7 +1330,7 @@
   request_param = vectorNew(4);
   if (fnc->timeout > now)
     rel = fnc->timeout - now;
-  else 
+  else
     rel = 0;
   addOptionalFields(request_param);
   fnc->rpc[fnc->rpcRepliesExpected-1]
@@ -1339,7 +1339,7 @@
                        request_param,
                        0,
                        rel,
-                       (RPC_Complete) &ping_reply_handler, 
+                       (RPC_Complete) &ping_reply_handler,
                        fnc);
   vectorFree(request_param);
   MUTEX_UNLOCK(&fnc->lock);
@@ -1349,9 +1349,9 @@
  * Find k nodes in the local buckets that are closest to the
  * given key for the given table.  Return instantly, do NOT
  * attempt to query remote peers.
- * 
+ *
  * @param hosts array with space for k hosts.
- * @return number of hosts found 
+ * @return number of hosts found
  */
 static unsigned int findLocalNodes(const DHT_TableId * table,
                                   const HashCode512 * key,
@@ -1385,7 +1385,7 @@
                              table)) {
 #if DEBUG_DHT
          EncName enc;
-         
+       
          IFLOG(LOG_DEBUG,
                hash2enc(&pos->id.hashPubKey,
                         &enc));
@@ -1405,7 +1405,7 @@
   } /* end for all buckets */
   return ret;
 }
-                                             
+                                       
 /**
  * We got a reply from the DHT-get operation.  Update the
  * record datastructures accordingly (and call the record's
@@ -1420,7 +1420,7 @@
   unsigned int i;
   unsigned int max;
   PeerInfo * pos;
-  EncName enc;      
+  EncName enc;
 
   ENTER();
   processOptionalFields(responder, results);
@@ -1453,7 +1453,7 @@
       return;
     }
     MUTEX_LOCK(&record->lock);
-    if (record->callback != NULL) 
+    if (record->callback != NULL)
       record->resultCallback(&record->keys[0],
                             value,
                             record->resultClosure);
@@ -1482,12 +1482,12 @@
        hash2enc(&peer->hashPubKey,
                 &enc));
   LOG(LOG_DEBUG,
-      "sending RPC '%s' to peer '%s'.\n",      
+      "sending RPC '%s' to peer '%s'.\n",
       "DHT_findvalue",
       &enc);
-#endif  
+#endif
   if (isNotCloserThanMe(&record->table,
-                       peer,                
+                       peer,           
                        &record->keys[0]))
     return; /* refuse! */
   cronTime(&now);
@@ -1518,14 +1518,14 @@
        record->rpcRepliesExpected,
        record->rpcRepliesExpected+1);
   addOptionalFields(param);
-  record->rpc[record->rpcRepliesExpected-1] 
+  record->rpc[record->rpcRepliesExpected-1]
     = rpcAPI->RPC_start(peer,
                        "DHT_findValue",
                        param,
                        0,
                        delta,
                        (RPC_Complete) &dht_findvalue_rpc_reply_callback,
-                       record); 
+                       record);
   RPC_paramFree(param);
 }
 
@@ -1558,14 +1558,14 @@
  * of the table (if so, we will attempt to locate a peer that is!)
  *
  * @param table table to use for the lookup
- * @param key the key to look up  
+ * @param key the key to look up
  * @param timeout how long to wait until this operation should
  *        automatically time-out
  * @param callback function to call on each result
  * @param closure extra argument to callback
  * @return handle to stop the async get
  */
-static struct DHT_GET_RECORD * 
+static struct DHT_GET_RECORD *
 dht_get_async_start(const DHT_TableId * table,
                    unsigned int type,
                    unsigned int keyCount,
@@ -1602,7 +1602,7 @@
     LOG(LOG_WARNING,
        _("'%s' called with timeout above 1 hour (bug?)\n"),
        __FUNCTION__);
-    timeout = 1 * cronHOURS;    
+    timeout = 1 * cronHOURS;
   }
 
   ret = MALLOC(sizeof(DHT_GET_RECORD));
@@ -1634,7 +1634,7 @@
          hash2enc(table,
                   &enc));
     LOG(LOG_DEBUG,
-       "I participate in the table '%s' for the '%s' operation.\n",      
+       "I participate in the table '%s' for the '%s' operation.\n",
        &enc,
        "DHT_GET");
 #endif
@@ -1660,7 +1660,7 @@
       return NULL;
     }
     /* if this peer is in 'hosts', try local datastore lookup */
-    for (i=0;i<count;i++) 
+    for (i=0;i<count;i++)
       if (hostIdentityEquals(coreAPI->myIdentity,
                             &hosts[i])) {
        res = ltd->store->get(ltd->store->closure,
@@ -1680,10 +1680,10 @@
            res);
 #endif
        break;
-      }  
-    
+      }
+
     if (ALPHA > ret->resultsFound) {
-      /* if less than ALPHA replies were found, send 
+      /* if less than ALPHA replies were found, send
         dht_get_RPC to the other peers */
       for (i=0;i<count;i++) {
        if (! hostIdentityEquals(coreAPI->myIdentity,
@@ -1693,7 +1693,7 @@
                hash2enc(&hosts[i].hashPubKey,
                         &enc));
          LOG(LOG_DEBUG,
-             "sending RPC '%s' to peer '%s' that also participates in the 
table.\n",      
+             "sending RPC '%s' to peer '%s' that also participates in the 
table.\n",
              "DHT_GET",
              &enc);
 #endif
@@ -1712,20 +1712,20 @@
        &enc,
        ALPHA);
 #endif
-    /* We do not particpate in the table; hence we need to use 
+    /* We do not particpate in the table; hence we need to use
        findKNodes to find an initial set of peers in that
        table; findKNodes tries to find k nodes and instantly
        allows us to query each node found.  For each peer found,
        we then perform send_dht_get_rpc.
-    */   
-    ret->kfnc 
+    */
+    ret->kfnc
       = findKNodes_start(table,
                         &keys[0],
                         timeout,
                         ALPHA,
                         (NodeFoundCallback) &send_dht_get_rpc,
                         ret);
-  }  
+  }
   MUTEX_UNLOCK(lock);
   return ret;
 }
@@ -1745,11 +1745,11 @@
   if (record->kfnc != NULL)
     findKNodes_stop(record->kfnc);
 
-  for (i=0;i<record->rpcRepliesExpected;i++) 
+  for (i=0;i<record->rpcRepliesExpected;i++)
     rpcAPI->RPC_stop(record->rpc[i]);
   MUTEX_DESTROY(&record->lock);
   resultsFound = record->resultsFound;
-  FREE(record); 
+  FREE(record);
 #if DEBUG_DHT
   LOG(LOG_DEBUG,
       "'%s' operation completed with %d results.\n",
@@ -1769,10 +1769,10 @@
  * start transitive search for peers from that new peer.
  *
  * @param value should contain a set of HeloMessages corresponding
- *  to the identities of peers that support the table that we're 
+ *  to the identities of peers that support the table that we're
  *  looking for; pass those Helos to the core *and* try to ping them.
  */
-static int 
+static int
 findnodes_dht_master_get_callback(const HashCode512 * key,
                                  const DataContainer * cont,
                                  FindNodesContext * fnc) {
@@ -1782,11 +1782,11 @@
 
   ENTER();
   dataLength = ntohl(cont->size) - sizeof(DataContainer);
-  
+
   if ( (dataLength % sizeof(PeerIdentity)) != 0) {
     LOG(LOG_DEBUG,
        "Response size was %d, expected multile of %d\n",
-       dataLength, 
+       dataLength,
        sizeof(PeerIdentity));
     LOG(LOG_WARNING,
        _("Invalid response to '%s'.\n"),
@@ -1796,9 +1796,9 @@
   id = (const PeerIdentity*) &cont[1];
   for (i=dataLength/sizeof(PeerIdentity)-1;i>=0;i--) {
     if (!hostIdentityEquals(&id[i],
-                           coreAPI->myIdentity)) 
+                           coreAPI->myIdentity))
       request_DHT_ping(&id[i],
-                      fnc);  
+                      fnc);
   }
   return OK;
 }
@@ -1822,7 +1822,7 @@
  * GNUnet core peer discovery).
  *
  * If we learn about new nodes in this step, add them to the RT table;
- * if we run out of space in the RT, send pings to oldest entry; if 
+ * if we run out of space in the RT, send pings to oldest entry; if
  * oldest entry did not respond to PING, replace it!
  *
  * This function is used periodially for each table that we have joined
@@ -1849,7 +1849,7 @@
                 &enc));
   LOG(LOG_DEBUG,
       "function '%s' called to look for nodes participating in table '%s'.\n",
-      __FUNCTION__,      
+      __FUNCTION__,
       &enc);
 #endif
   fnc = MALLOC(sizeof(FindNodesContext));
@@ -1881,7 +1881,7 @@
        with this timeout).  Improve k-best node until timeout
        expires */
     create_find_nodes_rpc((PeerIdentity*) &fnc->matches[i],
-                         fnc);                       
+                         fnc);                 
   }
 
   /* also search for more peers for this table? */
@@ -1893,8 +1893,8 @@
       LOG(LOG_DEBUG,
          "broadcasting RPC ping to find other peers for master table.\n");
 #endif
-     /* No or too few other DHT peers known, search 
-        for more by sending a PING to all connected peers 
+     /* No or too few other DHT peers known, search
+        for more by sending a PING to all connected peers
         that are not in the table already */
       coreAPI->forAllConnectedNodes((PerNodeCallback)&request_DHT_ping,
                                    fnc);
@@ -1930,7 +1930,7 @@
 /**
  * This stops the asynchronous findNodes process.  The search is aborted
  * and the k-best results are passed to the callback.
- * 
+ *
  * @param fnc context returned from findNodes_start
  * @param callback function to call for each peer found
  * @param closure extra argument to the callback
@@ -1951,8 +1951,8 @@
   }
 
   /* stop all async RPCs */
-  for (i=fnc->rpcRepliesExpected-1;i>=0;i--) 
-    rpcAPI->RPC_stop(fnc->rpc[i]);     
+  for (i=fnc->rpcRepliesExpected-1;i>=0;i--)
+    rpcAPI->RPC_stop(fnc->rpc[i]);
   SEMAPHORE_FREE(fnc->signal);
   MUTEX_DESTROY(&fnc->lock);
 
@@ -1971,7 +1971,7 @@
  * we're trying to find peers for.  Notify the caller about this peer.
  *
  * @param value should contain a set of HeloMessages corresponding
- *  to the identities of peers that support the table that we're 
+ *  to the identities of peers that support the table that we're
  *  looking for; pass those Helos to the core *and* to the callback
  *  as peers supporting the table.
  */
@@ -2033,8 +2033,8 @@
  * close to the given key that participate in that table.  Any node in
  * the table will do, but preference is given to nodes that are close.
  * Still, the first k nodes that were found are returned (just the
- * search goes towards the key).  This function is used for lookups 
- * in tables in which this peer does not participate in.  
+ * search goes towards the key).  This function is used for lookups
+ * in tables in which this peer does not participate in.
  *
  * If no (zero!) participating nodes are found locally, the a set of
  * introduction nodes for this table is obtained from the master table
@@ -2043,7 +2043,7 @@
  * (relying on GNUnet core peer discovery).
  *
  * If we learn about new nodes in this step, add them to the RT table;
- * if we run out of space in the RT, send pings to oldest entry; if 
+ * if we run out of space in the RT, send pings to oldest entry; if
  * oldest entry did not respond to PING, replace it!
  *
  * @param table the table which the peers must participate in,
@@ -2099,9 +2099,9 @@
                         matches,
                         k);
   if (callback != NULL)
-    for (i=0;i<found;i++)     
+    for (i=0;i<found;i++)
       callback(&matches[i],
-              closure); 
+              closure);
   if (found == k) {
 #if DEBUG_DHT
     LOG(LOG_DEBUG,
@@ -2113,7 +2113,7 @@
     return fnc; /* no need for anything else, we've found
                   all we care about! */
   }
-  fnc->k -= found;  
+  fnc->k -= found;
   fnc->found = found;
   FREE(matches);
 
@@ -2139,19 +2139,19 @@
                            0, /* type */
                            1, /* key count */
                            table, /* keys */
-                           timeout, 
+                           timeout,
                            
(DataProcessor)&find_k_nodes_dht_master_get_callback,
                            fnc,
                            (DHT_OP_Complete) 
&find_k_nodes_dht_master_get_complete,
                            fnc);
-  }  
+  }
   return fnc;
 }
 
 /**
- * This stops the asynchronous find-k-Nodes process. 
+ * This stops the asynchronous find-k-Nodes process.
  * The search is aborted.
- * 
+ *
  * @param fnc context returned from findNodes_start
  * @return number of peers found, SYSERR on error
  */
@@ -2167,8 +2167,8 @@
   }
 
   /* stop all async RPCs */
-  for (i=fnc->rpcRepliesExpected-1;i>=0;i--) 
-    rpcAPI->RPC_stop(fnc->rpc[i]);     
+  for (i=fnc->rpcRepliesExpected-1;i>=0;i--)
+    rpcAPI->RPC_stop(fnc->rpc[i]);
   MUTEX_DESTROY(&fnc->lock);
 
   i = fnc->found;
@@ -2197,7 +2197,7 @@
   MUTEX_LOCK(&record->lock);
   pos = findPeerInfo(responder);
   pos->lastActivity = cronTime(NULL);
-  
+
   max = RPC_paramCount(results);
   for (i=0;i<max;i++) {
     if (0 != strcmp("peer",
@@ -2209,7 +2209,7 @@
                                         (void**)&peer)) ||
         (dataLength != sizeof(PeerIdentity)) ) {
       EncName enc;
-      
+
       MUTEX_UNLOCK(&record->lock);
       hash2enc(&responder->hashPubKey,
               &enc);
@@ -2247,7 +2247,7 @@
 #endif
   ENTER();
   if (isNotCloserThanMe(&record->table,
-                       peer,                
+                       peer,           
                        &record->key))
     return;
   cronTime(&now);
@@ -2276,14 +2276,14 @@
        record->rpcRepliesExpected,
        record->rpcRepliesExpected+1);
   addOptionalFields(param);
-  record->rpc[record->rpcRepliesExpected-1] 
+  record->rpc[record->rpcRepliesExpected-1]
     = rpcAPI->RPC_start(peer,
                        "DHT_store",
                        param,
                        0,
                        delta,
                        (RPC_Complete) &dht_put_rpc_reply_callback,
-                       record); 
+                       record);
   RPC_paramFree(param);
 }
 
@@ -2295,14 +2295,14 @@
  * peer that is!)
  *
  * @param table table to use for the lookup
- * @param key the key to look up  
+ * @param key the key to look up
  * @param timeout how long to wait until this operation should
  *        automatically time-out
  * @param callback function to call on successful completion
  * @param closure extra argument to callback
  * @return handle to stop the async put
  */
-static struct DHT_PUT_RECORD * 
+static struct DHT_PUT_RECORD *
 dht_put_async_start(const DHT_TableId * table,
                    const HashCode512 * key,
                    cron_t timeout,
@@ -2330,7 +2330,7 @@
        hash2enc(table,
                 &enc2));
   LOG(LOG_DEBUG,
-      "performing '%s' operation on key '%s' and table '%s'.\n",      
+      "performing '%s' operation on key '%s' and table '%s'.\n",
       "DHT_PUT",
       &enc,
       &enc2);
@@ -2339,7 +2339,7 @@
     LOG(LOG_WARNING,
        _("'%s' called with timeout above 1 hour (bug?)\n"),
        __FUNCTION__);
-    timeout = 1 * cronHOURS;    
+    timeout = 1 * cronHOURS;
   }
   ret = MALLOC(sizeof(DHT_PUT_RECORD));
   ret->timeout = cronTime(NULL) + timeout;
@@ -2366,7 +2366,7 @@
          hash2enc(table,
                   &enc));
     LOG(LOG_DEBUG,
-       "I participate in the table '%s' for the '%s' operation.\n",      
+       "I participate in the table '%s' for the '%s' operation.\n",
        &enc,
        "DHT_PUT");
 #endif
@@ -2396,33 +2396,33 @@
        if (OK == ltd->store->put(ltd->store->closure,
                                  key,
                                  value,
-                                 0 /* FIXME: priority */)) 
+                                 0 /* FIXME: priority */))
          ret->confirmed_stores++;
        break;
-      }  
+      }
     }
 
     /* send dht_put_RPC to the other peers */
-    for (i=0;i<count;i++) 
+    for (i=0;i<count;i++)
       if (! hostIdentityEquals(coreAPI->myIdentity,
                               &hosts[i]))
        send_dht_put_rpc(&hosts[i],
-                        ret);  
+                        ret);
   } else {
-    /* We do not particpate in the table; hence we need to use 
+    /* We do not particpate in the table; hence we need to use
        findKNodes to find an initial set of peers in that
        table; findKNodes tries to find k nodes and instantly
        allows us to query each node found.  For each peer found,
        we then perform send_dht_put_rpc.
-    */   
-    ret->kfnc 
+    */
+    ret->kfnc
       = findKNodes_start(table,
                         key,
                         timeout,
                         ALPHA,
                         (NodeFoundCallback) &send_dht_put_rpc,
                         ret);
-  }  
+  }
   /* FIXME: ensure we call OP_Complete callback
      after timeout! */
   MUTEX_UNLOCK(lock);
@@ -2444,12 +2444,12 @@
   if (record->kfnc != NULL)
     findKNodes_stop(record->kfnc);
 
-  for (i=0;i<record->rpcRepliesExpected;i++) 
+  for (i=0;i<record->rpcRepliesExpected;i++)
     rpcAPI->RPC_stop(record->rpc[i]);
   MUTEX_DESTROY(&record->lock);
   i = record->confirmed_stores;
   FREE(record->value);
-  FREE(record); 
+  FREE(record);
   if (i > 0)
     return OK;
   else
@@ -2481,7 +2481,7 @@
   for (i=0;i<max;i++) {
     if (0 != strcmp("peer",
                    RPC_paramName(results, i)))
-      continue; /* ignore */     
+      continue; /* ignore */
     if ( (OK != RPC_paramValueByPosition(results,
                                         i,
                                         &dataLength,
@@ -2527,7 +2527,7 @@
       &enc);
 #endif
   if (isNotCloserThanMe(&record->table,
-                       peer,                
+                       peer,           
                        &record->key))
     return; /* refuse! */
   cronTime(&now);
@@ -2557,14 +2557,14 @@
        record->rpcRepliesExpected,
        record->rpcRepliesExpected+1);
   addOptionalFields(param);
-  record->rpc[record->rpcRepliesExpected-1] 
+  record->rpc[record->rpcRepliesExpected-1]
     = rpcAPI->RPC_start(peer,
                        "DHT_remove",
                        param,
                        0,
                        delta,
                        (RPC_Complete) &dht_remove_rpc_reply_callback,
-                       record); 
+                       record);
   RPC_paramFree(param);
 }
 
@@ -2575,14 +2575,14 @@
  * peer that is!)
  *
  * @param table table to use for the lookup
- * @param key the key to look up  
+ * @param key the key to look up
  * @param timeout how long to wait until this operation should
  *        automatically time-out (relative time)
  * @param callback function to call on successful completion
  * @param closure extra argument to callback
  * @return handle to stop the async remove
  */
-static struct DHT_REMOVE_RECORD * 
+static struct DHT_REMOVE_RECORD *
 dht_remove_async_start(const DHT_TableId * table,
                       const HashCode512 * key,
                       cron_t timeout,
@@ -2593,12 +2593,12 @@
   LocalTableData * ltd;
   DHT_REMOVE_RECORD * ret;
   unsigned int count;
-  
+
   if (timeout > 1 * cronHOURS) {
     LOG(LOG_WARNING,
        _("'%s' called with timeout above 1 hour (bug?)\n"),
        __FUNCTION__);
-    timeout = 1 * cronHOURS;    
+    timeout = 1 * cronHOURS;
   }
   ENTER();
   ret = MALLOC(sizeof(DHT_REMOVE_RECORD));
@@ -2651,33 +2651,33 @@
                             &hosts[i])) {
        if (OK == ltd->store->del(ltd->store->closure,
                                  key,
-                                 value)) 
+                                 value))
          ret->confirmed_stores++;
        break;
-      }  
+      }
     }
 
     /* send dht_remove_RPC to the other peers */
-    for (i=0;i<count;i++) 
+    for (i=0;i<count;i++)
       if (! hostIdentityEquals(coreAPI->myIdentity,
                               &hosts[i]))
        send_dht_remove_rpc(&hosts[i],
-                           ret);  
+                           ret);
   } else {
-    /* We do not particpate in the table; hence we need to use 
+    /* We do not particpate in the table; hence we need to use
        findKNodes to find an initial set of peers in that
        table; findKNodes tries to find k nodes and instantly
        allows us to query each node found.  For each peer found,
        we then perform send_dht_remove_rpc.
-    */   
-    ret->kfnc 
+    */
+    ret->kfnc
       = findKNodes_start(table,
                         key,
                         timeout,
                         ALPHA,
                         (NodeFoundCallback) &send_dht_remove_rpc,
                         ret);
-  }  
+  }
   MUTEX_UNLOCK(lock);
   return ret;
 }
@@ -2697,12 +2697,12 @@
   if (record->kfnc != NULL)
     findKNodes_stop(record->kfnc);
 
-  for (i=0;i<record->rpcRepliesExpected;i++) 
+  for (i=0;i<record->rpcRepliesExpected;i++)
     rpcAPI->RPC_stop(record->rpc[i]);
   MUTEX_DESTROY(&record->lock);
   i = record->confirmed_stores;
   FREE(record->value);
-  FREE(record); 
+  FREE(record);
   if (i > 0)
     return OK;
   else
@@ -2748,29 +2748,29 @@
                       const DataContainer * value,
                       MigrationClosure * cls) {
   ENTER();
-  if (cls->puts[cls->putsPos] != NULL) 
+  if (cls->puts[cls->putsPos] != NULL)
     dht_put_async_stop(cls->puts[cls->putsPos]);
-  cls->puts[cls->putsPos] 
+  cls->puts[cls->putsPos]
     = dht_put_async_start(&cls->table,
                          key,
                          cls->timeout,
                          value,
                          NULL,
                          NULL);
-  cls->putsPos = (cls->putsPos + 1) % cls->maxPuts;  
+  cls->putsPos = (cls->putsPos + 1) % cls->maxPuts;
   gnunet_util_sleep(cls->timeout / cls->maxPuts);
   return OK;
 }
 
-  
+
 /**
  * Leave a table (stop storing data for the table).  Leave
- * fails if the node is not joint with the table.  Blocks 
+ * fails if the node is not joint with the table.  Blocks
  * for at most timeout ms to migrate content elsewhere.
  *
  * @param datastore the storage callbacks to use for the table
  * @param table the ID of the table
- * @param timeout how long to wait for other peers to respond to 
+ * @param timeout how long to wait for other peers to respond to
  *   the leave request (has no impact on success or failure);
  *   but only timeout time is available for migrating data, so
  *   pick this value with caution.
@@ -2789,7 +2789,7 @@
     LOG(LOG_WARNING,
        _("'%s' called with timeout above 1 hour (bug?)\n"),
        __FUNCTION__);
-    timeout = 1 * cronHOURS;    
+    timeout = 1 * cronHOURS;
   }
   ENTER();
   MUTEX_LOCK(lock);
@@ -2817,7 +2817,7 @@
        not needed/possible if we quit the DHT
        altogether... */
     DataContainer * value;
-    
+
     value = MALLOC(sizeof(PeerIdentity) + sizeof(DataContainer));
     value->size = htonl(sizeof(PeerIdentity) + sizeof(DataContainer));
     memcpy(&value[1],
@@ -2834,13 +2834,13 @@
   }
 
   /* migrate content if applicable! */
-  count = old.store->iterate(old.store->closure, 
+  count = old.store->iterate(old.store->closure,
                             NULL, NULL);
   cls.table = *table;
   cls.maxPuts = getConfigurationInt("DHT",
                                    "MAX-MIGRATION-PARALLELISM");
   if (cls.maxPuts == 0)
-    cls.maxPuts = 16;  
+    cls.maxPuts = 16;
   /* migration time for each entry:
      total time times parallelism by count */
   if ( (count > 0) && (timeout > 0) ) {
@@ -2856,7 +2856,7 @@
        dht_put_async_stop(cls.puts[i]);
        cls.puts[i] = NULL;
       }
-    FREE(cls.puts);  
+    FREE(cls.puts);
   }
   /* clean up! */
   if (remRec != NULL)
@@ -2887,9 +2887,9 @@
       &enc);
 #endif
   ENTER();
-  processOptionalFields(sender, arguments); 
+  processOptionalFields(sender, arguments);
   /* processes 'tables' */
-  addOptionalFields(results); 
+  addOptionalFields(results);
   /* adds 'tables' (with very high probability since there's nothing else,
      except if we participate in over 50 tables, which would be bad...) */
 }
@@ -2901,7 +2901,7 @@
  * @param arguments::key the key to route towards
  * @param arguments::table the id of the table
  * @param results::peers list of peers found to participate in the given table 
with ID close to key;
- *    peers consists of HostIdentities one after the other. See 
+ *    peers consists of HostIdentities one after the other. See
  *    create_find_nodes_rpc_complete_callback for the parser of the reply.
  * @param results::tables list of tables that this peer participates in 
(optional)
  */
@@ -2928,7 +2928,7 @@
                                   "table",
                                   &dataLength,
                                   (void**) &table)) ||
-       (dataLength != sizeof(DHT_TableId)) ) {    
+       (dataLength != sizeof(DHT_TableId)) ) {
     LOG(LOG_WARNING,
        _("Received invalid RPC '%s'.\n"),
        "DHT_findNode");
@@ -2944,7 +2944,7 @@
               "peer",
               count * sizeof(PeerIdentity),
               peers);
-  FREE(peers);  
+  FREE(peers);
   addOptionalFields(results);
 }
 
@@ -2967,10 +2967,10 @@
     MUTEX_UNLOCK(&fw->lock);
     return;
   }
-  dht_get_async_stop(fw->get_record); 
+  dht_get_async_stop(fw->get_record);
   fw->get_record = NULL;
 
-  /* build RPC reply, call RPC callback */ 
+  /* build RPC reply, call RPC callback */
   if (fw->callback != NULL) {
     results = RPC_paramNew();
     addOptionalFields(results);
@@ -3007,7 +3007,7 @@
 
 static void rpc_dht_findValue_complete(RPC_DHT_FindValue_Context * ctx) {
   /* FIXME! */
-  
+
 }
 
 /**
@@ -3034,7 +3034,7 @@
   unsigned int keysLength;
   unsigned int dataLength;
   RPC_DHT_FindValue_Context * fw_context;
-  
+
   ENTER();
   processOptionalFields(sender, arguments);
   /* parse arguments */
@@ -3062,22 +3062,22 @@
        _("Received invalid RPC '%s'.\n"),
        "DHT_findValue");
     return;
-  }   
+  }
 
-  fw_context 
+  fw_context
     = MALLOC(sizeof(RPC_DHT_FindValue_Context));
   MUTEX_CREATE_RECURSIVE(&fw_context->lock);
   fw_context->count
     = 0;
   fw_context->done
     = NO;
-  fw_context->results 
+  fw_context->results
     = NULL;
   fw_context->callback
     = callback;
   fw_context->rpc_context
-    = rpc_context;  
-  fw_context->get_record 
+    = rpc_context;
+  fw_context->get_record
     = dht_get_async_start(table,
                          ntohl(*type),
                          keysLength / sizeof(HashCode512),
@@ -3119,7 +3119,7 @@
   dht_put_async_stop(fw->put_record);
   fw->put_record = NULL;
 
-  /* build RPC reply, call RPC callback */ 
+  /* build RPC reply, call RPC callback */
   if (fw->callback != NULL) {
     results = RPC_paramNew();
     addOptionalFields(results);
@@ -3153,9 +3153,9 @@
   unsigned long long * timeout;
   RPC_DHT_store_Context * fw_context;
   LocalTableData * ltd;
-  
+
   ENTER();
-  processOptionalFields(sender, arguments); 
+  processOptionalFields(sender, arguments);
   /* parse arguments */
   if ( (OK != RPC_paramValueByName(arguments,
                                   "key",
@@ -3178,14 +3178,14 @@
        _("Received invalid RPC '%s'.\n"),
        "DHT_store");
     return;
-  }   
+  }
 
-  fw_context 
+  fw_context
     = MALLOC(sizeof(RPC_DHT_store_Context));
   MUTEX_CREATE_RECURSIVE(&fw_context->lock);
   MUTEX_LOCK(lock);
   ltd = getLocalTableData(table);
-  if (ltd == NULL) {    
+  if (ltd == NULL) {
     LOG(LOG_WARNING,
        _("RPC for '%s' received for table that we do not participate in!\n"),
        "DHT_store");
@@ -3197,7 +3197,7 @@
     = callback;
   fw_context->rpc_context
     = rpc_context;
-  fw_context->put_record 
+  fw_context->put_record
     = dht_put_async_start(table,
                          key,
                          ntohll(*timeout),
@@ -3237,7 +3237,7 @@
   dht_remove_async_stop(fw->remove_record);
   fw->remove_record = NULL;
 
-  /* build RPC reply, call RPC callback */ 
+  /* build RPC reply, call RPC callback */
   results = RPC_paramNew();
   addOptionalFields(results);
   if (fw->callback != NULL)
@@ -3281,7 +3281,7 @@
   unsigned long long * timeout;
   RPC_DHT_remove_Context * fw_context;
   LocalTableData * ltd;
-  
+
   ENTER();
   processOptionalFields(sender, arguments);
   /* parse arguments */
@@ -3304,16 +3304,16 @@
        _("Received invalid RPC '%s'.\n"),
        "DHT_remove");
     return;
-  }   
-    
+  }
+
   value = RPC_paramDataContainerByName(arguments,
                                       "value");
-  fw_context 
+  fw_context
     = MALLOC(sizeof(RPC_DHT_remove_Context));
   MUTEX_CREATE_RECURSIVE(&fw_context->lock);
   MUTEX_LOCK(lock);
   ltd = getLocalTableData(table);
-  if (ltd == NULL) {    
+  if (ltd == NULL) {
     LOG(LOG_DEBUG,
        _("RPC for '%s' received for table that we do not participate in!\n"),
        "DHT_removed");
@@ -3325,7 +3325,7 @@
     = callback;
   fw_context->rpc_context
     = rpc_context;
-  fw_context->remove_record 
+  fw_context->remove_record
     = dht_remove_async_start(table,
                             key,
                             ntohll(*timeout),
@@ -3351,7 +3351,7 @@
  * to free the associated resources.  The point is chosen such
  * that the cron-job will not allocate new resources (since all
  * tables and all buckets are empty at that point).
- */ 
+ */
 static void dhtMaintainJob(void * shutdownFlag) {
   static struct RPC_Record ** pingRecords = NULL;
   static cron_t * pingTimes = NULL;
@@ -3388,10 +3388,10 @@
       dht_put_async_stop(putRecords[i]);
       putRecords[i] = putRecords[putRecordsSize-1];
       putTimes[i] = putTimes[putRecordsSize-1];
-      GROW(putRecords, 
+      GROW(putRecords,
           putRecordsSize,
           putRecordsSize-1);
-      GROW(putRecords, 
+      GROW(putRecords,
           putTimesSize,
           putTimesSize-1);
     }
@@ -3427,7 +3427,7 @@
     }
   }
   if (shutdownFlag != NULL) {
-    MUTEX_UNLOCK(lock);    
+    MUTEX_UNLOCK(lock);
     return;
   }
 
@@ -3445,11 +3445,11 @@
       "'%s' issues DHT_PUTs to advertise tables this peer participates in.\n",
       __FUNCTION__);
 #endif
-    
+
   for (i=0;i<tablesCount;i++) {
     if (tables[i].lastMasterAdvertisement + DHT_MAINTAIN_BUCKET_FREQUENCY < 
now) {
       tables[i].lastMasterAdvertisement = now;
-      if (equalsHashCode512(&tables[i].id, 
+      if (equalsHashCode512(&tables[i].id,
                            &masterTableId))
        continue;
       GROW(putRecords,
@@ -3458,19 +3458,19 @@
       GROW(putTimes,
           putTimesSize,
           putTimesSize+1);
-      putRecords[putRecordsSize-1] 
+      putRecords[putRecordsSize-1]
        = dht_put_async_start(&masterTableId,
                              &tables[i].id,
                              DHT_MAINTAIN_BUCKET_FREQUENCY,
                              value,
                              NULL,
                              NULL);
-      putTimes[putTimesSize-1] = now;    
+      putTimes[putTimesSize-1] = now;
     }
   }
   vectorFree(request_param);
   FREE(value);
-  
+
   /*
     for each table that we have joined gather OUR neighbours
   */
@@ -3488,14 +3488,14 @@
       GROW(findTimes,
           findTimesSize,
           findTimesSize+1);
-      findRecords[findRecordsSize-1] 
+      findRecords[findRecordsSize-1]
        = findNodes_start(&tables[i].id,
                          &coreAPI->myIdentity->hashPubKey,
                          DHT_MAINTAIN_FIND_FREQUENCY);
       findTimes[findTimesSize-1] = now;
     }
   }
-  /* 
+  /*
      for all peers in RT:
      a) if lastTableRefresh is very old, send ping
      b) if lastActivity is very very old, drop
@@ -3548,24 +3548,24 @@
                              request_param,
                              0,
                              DHT_PING_FREQUENCY,
-                             (RPC_Complete) &ping_reply_handler, 
+                             (RPC_Complete) &ping_reply_handler,
                              NULL);
-       pingTimes[pingTimesSize-1] 
+       pingTimes[pingTimesSize-1]
          = now;
-      }   
+      }
       pos = vectorGetNext(bucket->peers);
     }
   } /* end for all buckets */
   vectorFree(request_param);
 
-  /* 
+  /*
      OPTIMIZE-ME:
      for all content in all tables:
      check if this peer should still be responsible for
      it, if not, migrate!
   */
   MUTEX_UNLOCK(lock);
-} 
+}
 
 /**
  * Provide the DHT service.  The DHT service depends on the RPC
@@ -3577,7 +3577,7 @@
 DHT_ServiceAPI * provide_module_dht(CoreAPIForApplication * capi) {
   static DHT_ServiceAPI api;
   unsigned int i;
-  
+
   ENTER();
   coreAPI = capi;
   rpcAPI = capi->requestService("rpc");
@@ -3595,7 +3595,7 @@
     buckets[i].bend = 160 * (i+1) / bucketCount;
     buckets[i].peers = vectorNew(4);
   }
-  
+
   rpcAPI->RPC_register("DHT_ping",
                       &rpc_DHT_ping);
   rpcAPI->RPC_register("DHT_findNode",
@@ -3622,7 +3622,7 @@
                          "MASTER-TABLE-SIZE");
   if (i == 0)
     i = 65536; /* 64k memory should suffice */
-  masterTableDatastore 
+  masterTableDatastore
     = create_datastore_dht_master(i);
   dht_join(masterTableDatastore,
           &masterTableId);
@@ -3663,13 +3663,13 @@
   }
   /* leave the master table */
   dht_leave(&masterTableId,
-           0);  
+           0);
   for (i=0;i<bucketCount;i++) {
     bucket = (PeerInfo*) vectorGetFirst(buckets[i].peers);
     while (bucket != NULL) {
       GROW(bucket->tables,
           bucket->tableCount,
-          0); 
+          0);
       bucket = (PeerInfo*) vectorGetNext(buckets[i].peers);
     }
     vectorFree(buckets[i].peers);

Modified: GNUnet/src/applications/dht/module/dht_test.c
===================================================================
--- GNUnet/src/applications/dht/module/dht_test.c       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/dht/module/dht_test.c       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -29,14 +29,14 @@
 
 DHT_ServiceAPI * provide_dht_protocol(CoreAPIForApplication * capi);
 int release_dht_protocol();
-RPC_ServiceAPI * provide_rpc_protocol(CoreAPIForApplication * capi); 
+RPC_ServiceAPI * provide_rpc_protocol(CoreAPIForApplication * capi);
 void release_rpc_protocol();
 
 static int forAllConnectedNodes(PerNodeCallback method,
                                void * arg) {
   return 0;
 }
- 
+
 static void sendToNode(const PeerIdentity * hostId,
                       const p2p_HEADER * message,
                       unsigned int priority,
@@ -61,7 +61,7 @@
   return SYSERR;
 }
 
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   char c;
 
@@ -70,18 +70,18 @@
     static struct GNoption long_options[] = {
       { "config",  1, 0, 'c' },
       { 0,0,0,0 }
-    };    
+    };
     c = GNgetopt_long(argc,
-                     argv, 
-                     "c:", 
-                     long_options, 
+                     argv,
+                     "c:",
+                     long_options,
                      &option_index);
-    
-    if (c == -1) 
+
+    if (c == -1)
       break;  /* No more flags to process */
-    
+
     switch(c) {
-    case 'c': 
+    case 'c':
       FREENONNULL(setConfigurationString("FILES",
                                         "gnunet.conf",
                                         GNoptarg));
@@ -100,7 +100,7 @@
 int main(int argc,
         char * argv[]) {
   PeerIdentity id;
-  
+
   if (1)
     return 0; /* testcase not complete, always pass for now */
 
@@ -108,7 +108,7 @@
 
   if (OK != initUtil(argc, argv, &parseCommandLine))
     return 1;
-  
+
   /* for DHT */
   memset(&dht_capi, 0, sizeof(CoreAPIForApplication));
   dht_capi.myIdentity = &id;
@@ -122,7 +122,7 @@
   rpc_capi.registerHandler = &registerHandler;
   rpc_capi.unregisterHandler = &unregisterHandler;
   rpc_capi.sendToNode = &sendToNode;
-  
+
   rpcAPI = provide_rpc_protocol(&rpc_capi);
   if (rpcAPI == NULL)
     ABORT();

Modified: GNUnet/src/applications/dht/tools/dht-join.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht-join.c        2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/dht/tools/dht-join.c        2005-03-20 23:54:53 UTC 
(rev 464)
@@ -56,34 +56,34 @@
 
 static int parseOptions(int argc,
                        char ** argv) {
-  int c;  
+  int c;
 
   while (1) {
     int option_index = 0;
     static struct GNoption long_options[] = {
       LONG_DEFAULT_OPTIONS,
       { "memory", 1, 0, 'm' },
-      { "table", 1, 0, 't' },      
+      { "table", 1, 0, 't' },
       { "verbose", 0, 0, 'V' },
       { 0,0,0,0 }
     };
     c = GNgetopt_long(argc,
                      argv,
                      "vhH:c:L:dt:m:T:V",
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
     switch(c) {
-    case 'h': 
-      printHelp(); 
+    case 'h':
+      printHelp();
       return SYSERR;
     case 'm': {
       unsigned int max;
       if (1 != sscanf(GNoptarg, "%ud", &max)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-m");
        return SYSERR;
@@ -102,7 +102,7 @@
     case 'T': {
       unsigned int max;
       if (1 != sscanf(GNoptarg, "%ud", &max)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-T");
        return SYSERR;
@@ -113,7 +113,7 @@
       }
       break;
     }
-    case 'v': 
+    case 'v':
       printf("dht-join v0.0.0\n");
       return SYSERR;
     case 'V':
@@ -126,8 +126,8 @@
       return SYSERR;
     } /* end of parsing commandline */
   } /* while (1) */
-  if (argc - GNoptind != 0) 
-    LOG(LOG_WARNING, 
+  if (argc - GNoptind != 0)
+    LOG(LOG_WARNING,
        _("Superflous arguments (ignored).\n"));
   return OK;
 }
@@ -156,7 +156,7 @@
                  DataProcessor processor,
                  void * pclosure) {
   int ret;
-  Blockstore * cls = (Blockstore*) closure;  
+  Blockstore * cls = (Blockstore*) closure;
   LOGKEY(&keys[0]);
   ret = cls->get(cls->closure,
                 type,
@@ -165,10 +165,10 @@
                 keys,
                 processor,
                 pclosure);
-  LOGRET(ret);  
+  LOGRET(ret);
   return ret;
 }
-  
+
 static int store(void * closure,
                 const HashCode512 * key,
                 const DataContainer * value,
@@ -211,17 +211,17 @@
   return ret;
 }
 
-int main(int argc, 
+int main(int argc,
         char **argv) {
   char * tableName;
   unsigned int mem;
   HashCode512 table;
   Blockstore myStore;
 
-  if (SYSERR == initUtil(argc, argv, &parseOptions)) 
+  if (SYSERR == initUtil(argc, argv, &parseOptions))
     return 0;
 
-  tableName = getConfigurationString("DHT-JOIN", 
+  tableName = getConfigurationString("DHT-JOIN",
                                     "TABLE");
   if (tableName == NULL) {
     printf(_("No table name specified, using '%s'.\n"),
@@ -259,8 +259,8 @@
   printf(_("Joined DHT.  Press CTRL-C to leave.\n"));
   /* wait for CTRL-C */
   wait_for_shutdown();
-  
-  /* shutdown */ 
+
+  /* shutdown */
   if (OK != DHT_LIB_leave(&table,
                          getConfigurationInt("DHT-JOIN",
                                              "TIMEOUT") * cronSECONDS)) {

Modified: GNUnet/src/applications/dht/tools/dht-query.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht-query.c       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/dht/tools/dht-query.c       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -49,7 +49,7 @@
 
 static int parseOptions(int argc,
                        char ** argv) {
-  int c;  
+  int c;
 
   while (1) {
     int option_index = 0;
@@ -62,15 +62,15 @@
     c = GNgetopt_long(argc,
                      argv,
                      "vhH:c:L:dt:T:",
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
     switch(c) {
-    case 'h': 
-      printHelp(); 
+    case 'h':
+      printHelp();
       return SYSERR;
     case 't':
       FREENONNULL(setConfigurationString("DHT-QUERY",
@@ -80,7 +80,7 @@
      case 'T': {
       unsigned int max;
       if (1 != sscanf(GNoptarg, "%ud", &max)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-T");
        return SYSERR;
@@ -90,8 +90,8 @@
                            max);
       }
       break;
-    } 
-    case 'v': 
+    }
+    case 'v':
       printf("dht-query v0.0.1\n");
       return SYSERR;
     default:
@@ -102,7 +102,7 @@
     } /* end of parsing commandline */
   } /* while (1) */
   if (argc - GNoptind == 0) {
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("No commands specified.\n"));
     printHelp();
     return SYSERR;
@@ -127,7 +127,7 @@
                   const char * key) {
   int ret;
   HashCode512 hc;
-  
+
   hash(key,
        strlen(key),
        &hc);
@@ -143,7 +143,7 @@
                                        "TIMEOUT"),
                    (DataProcessor) &printCallback,
                    (void*) key);
-  if (ret == 0) 
+  if (ret == 0)
     printf("%s(%s) operation returned no results.\n",
           "get",
           key);
@@ -164,12 +164,12 @@
   LOG(LOG_DEBUG,
       "Issuing '%s(%s,%s)' command.\n",
       "put", key, value);
-  if (OK == DHT_LIB_put(&table,                       
+  if (OK == DHT_LIB_put(&table,                
                        &hc,
                        1, /* prio */
                        getConfigurationInt("DHT-QUERY",
                                            "TIMEOUT"),
-                       dc)) { 
+                       dc)) {
     printf(_("'%s(%s,%s)' succeeded\n"),
           "put",
           key, value);
@@ -177,7 +177,7 @@
     printf(_("'%s(%s,%s)' failed.\n"),
           "put",
           key, value);
-  }      
+  }    
   FREE(dc);
 }
 
@@ -200,7 +200,7 @@
                           &hc,
                           getConfigurationInt("DHT-QUERY",
                                               "TIMEOUT"),
-                          dc)) { 
+                          dc)) {
     printf(_("'%s(%s,%s)' succeeded\n"),
           "remove",
           key, value);
@@ -208,12 +208,12 @@
     printf(_("'%s(%s,%s)' failed.\n"),
           "remove",
           key, value);
-  }      
+  }    
   FREE(dc);
 }
 
 
-int main(int argc, 
+int main(int argc,
         char **argv) {
   char * tableName;
   int count;
@@ -221,11 +221,11 @@
   int i;
   GNUNET_TCP_SOCKET * handle;
 
-  if (SYSERR == initUtil(argc, argv, &parseOptions)) 
+  if (SYSERR == initUtil(argc, argv, &parseOptions))
     return 0;
 
   count = getConfigurationStringList(&commands);
-  tableName = getConfigurationString("DHT-QUERY", 
+  tableName = getConfigurationString("DHT-QUERY",
                                     "TABLE");
   if (tableName == NULL) {
     printf(_("No table name specified, using '%s'.\n"),
@@ -238,18 +238,18 @@
         strlen(tableName),
         &table);
   }
-  FREE(tableName);  
+  FREE(tableName);
   DHT_LIB_init();
   handle = getClientSocket();
   if (handle == NULL) {
-    fprintf(stderr, 
+    fprintf(stderr,
            _("Failed to connect to gnunetd.\n"));
     return 1;
   }
 
   for (i=0;i<count;i++) {
     if (0 == strcmp("get", commands[i])) {
-      if (i+2 > count) 
+      if (i+2 > count)
        errexit(_("Command '%s' requires an argument ('%s').\n"),
                "get",
                "key");
@@ -257,7 +257,7 @@
       continue;
     }
     if (0 == strcmp("put", commands[i])) {
-      if (i+3 > count) 
+      if (i+3 > count)
        errexit(_("Command '%s' requires two arguments ('%s' and '%s').\n"),
                "put",
                "key",
@@ -267,7 +267,7 @@
       continue;
     }
     if (0 == strcmp("remove", commands[i])) {
-      if (i+3 > count) 
+      if (i+3 > count)
        errexit(_("Command '%s' requires two arguments ('%s' and '%s').\n"),
                "remove",
                "key",

Modified: GNUnet/src/applications/dht/tools/dht_api.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_api.c 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/dht/tools/dht_api.c 2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 
 /**
  * @file tools/dht_api.c
- * @brief DHT-module's core API's implementation. 
+ * @brief DHT-module's core API's implementation.
  * @author Tomi Tukiainen, Christian Grothoff
  */
 
@@ -79,11 +79,11 @@
  * Check if the given message is an ACK.  If so,
  * return the status, otherwise SYSERR.
  */
-static int checkACK(CS_HEADER * reply) {  
+static int checkACK(CS_HEADER * reply) {
   LOG(LOG_DEBUG,
       "received ACK from gnunetd\n");
   if ( (sizeof(DHT_CS_REPLY_ACK) == ntohs(reply->size)) &&
-       (DHT_CS_PROTO_REPLY_ACK == ntohs(reply->type)) ) 
+       (DHT_CS_PROTO_REPLY_ACK == ntohs(reply->type)) )
     return ntohl(((DHT_CS_REPLY_ACK*)reply)->status);
   return SYSERR;
 }
@@ -111,7 +111,7 @@
                          void * cls) {
   TableList * list = (TableList*) cls;
   DHT_CS_REPLY_RESULTS * reply;
- 
+
   reply = MALLOC(sizeof(DHT_CS_REPLY_RESULTS) + ntohl(value->size) + 
sizeof(HashCode512));
   reply->header.size = htons(sizeof(DHT_CS_REPLY_RESULTS) + ntohl(value->size) 
+ sizeof(HashCode512));
   reply->header.type = htons(DHT_CS_PROTO_REPLY_GET);
@@ -147,24 +147,24 @@
   CS_HEADER * reply;
   DHT_CS_REQUEST_JOIN req;
   int ok;
-  
+
   req.header.size = htons(sizeof(DHT_CS_REQUEST_JOIN));
-  req.header.type = htons(DHT_CS_PROTO_REQUEST_JOIN);  
+  req.header.type = htons(DHT_CS_PROTO_REQUEST_JOIN);
   req.table = list->table;
 
   while (list->leave_request == NO) {
-    if (list->sock == NULL) {     
+    if (list->sock == NULL) {
       gnunet_util_sleep(500 * cronMILLIS);
       MUTEX_LOCK(&list->lock);
       if (list->leave_request == NO)
-       list->sock  = getClientSocket();      
+       list->sock  = getClientSocket();
       MUTEX_UNLOCK(&list->lock);
     }
     if (list->sock == NULL)
       continue;
 
     ok = NO;
-    /* send 'join' message via socket! */    
+    /* send 'join' message via socket! */
     if (OK == writeToSocket(list->sock,
                            &req.header)) {
       reply = NULL;
@@ -271,9 +271,9 @@
          MUTEX_UNLOCK(&list->lock);
          break;
        }
-       value = MALLOC(sizeof(DataContainer) + 
-                      ntohs(buffer->size) - sizeof(DHT_CS_REQUEST_PUT));       
-       value->size = htonl(sizeof(DataContainer) + 
+       value = MALLOC(sizeof(DataContainer) +
+                      ntohs(buffer->size) - sizeof(DHT_CS_REQUEST_PUT));
+       value->size = htonl(sizeof(DataContainer) +
                            ntohs(buffer->size) - sizeof(DHT_CS_REQUEST_PUT));
        memcpy(&value[1],
               &req[1],
@@ -326,9 +326,9 @@
          break;
        }
 
-       value = MALLOC(sizeof(DataContainer) + 
-                      ntohs(buffer->size) - sizeof(DHT_CS_REQUEST_REMOVE));    
   
-       value->size = htonl(sizeof(DataContainer) + 
+       value = MALLOC(sizeof(DataContainer) +
+                      ntohs(buffer->size) - sizeof(DHT_CS_REQUEST_REMOVE));
+       value->size = htonl(sizeof(DataContainer) +
                            ntohs(buffer->size) - 
sizeof(DHT_CS_REQUEST_REMOVE));
        memcpy(&value[1],
               &req[1],
@@ -415,7 +415,7 @@
  *
  * @param datastore the storage callbacks to use for the table
  * @param table the ID of the table
- * @param timeout how long to wait for other peers to respond to 
+ * @param timeout how long to wait for other peers to respond to
  *   the join request (has no impact on success or failure)
  * @return SYSERR on error, OK on success
  */
@@ -425,7 +425,7 @@
   int i;
 
   MUTEX_LOCK(&lock);
-  for (i=0;i<tableCount;i++) 
+  for (i=0;i<tableCount;i++)
     if (equalsHashCode512(&tables[i]->table,
                          table)) {
       LOG(LOG_WARNING,
@@ -454,7 +454,7 @@
     FREE(list);
     MUTEX_UNLOCK(&lock);
     return SYSERR;
-  } 
+  }
   GROW(tables,
        tableCount,
        tableCount+1);
@@ -470,7 +470,7 @@
  *
  * @param datastore the storage callbacks to use for the table
  * @param table the ID of the table
- * @param timeout how long to wait for other peers to respond to 
+ * @param timeout how long to wait for other peers to respond to
  *   the leave request (has no impact on success or failure);
  *   but only timeout time is available for migrating data, so
  *   pick this value with caution.
@@ -484,8 +484,8 @@
   DHT_CS_REQUEST_LEAVE req;
   CS_HEADER * reply;
   int ret;
-  GNUNET_TCP_SOCKET * sock;  
-  
+  GNUNET_TCP_SOCKET * sock;
+
   list = NULL;
   MUTEX_LOCK(&lock);
   for (i=0;i<tableCount;i++) {
@@ -507,7 +507,7 @@
   }
 
   list->leave_request = YES;
-  /* send LEAVE message! */  
+  /* send LEAVE message! */
   req.header.size = htons(sizeof(DHT_CS_REQUEST_LEAVE));
   req.header.type = htons(DHT_CS_PROTO_REQUEST_LEAVE);
   req.timeout = htonll(timeout);
@@ -526,12 +526,12 @@
        else
          LOG(LOG_WARNING,
              _("gnunetd signaled error in response to '%s' message\n"),
-             "DHT_CS_REQUEST_LEAVE");            
+             "DHT_CS_REQUEST_LEAVE");          
        FREE(reply);
       } else {
        LOG(LOG_WARNING,
            _("Failed to receive response to '%s' message from gnunetd\n"),
-           "DHT_CS_REQUEST_LEAVE");      
+           "DHT_CS_REQUEST_LEAVE");
       }
     } else {
       LOG(LOG_WARNING,
@@ -565,7 +565,7 @@
  * The peer does not have to be part of the table!
  *
  * @param table table to use for the lookup
- * @param key the key to look up  
+ * @param key the key to look up
  * @param timeout how long to wait until this operation should
  *        automatically time-out
  * @param maxResults maximum number of results to obtain, size of the results 
array
@@ -592,7 +592,7 @@
   if (sock == NULL)
     return SYSERR;
 
-  req = MALLOC(sizeof(DHT_CS_REQUEST_GET) + 
+  req = MALLOC(sizeof(DHT_CS_REQUEST_GET) +
               (keyCount-1) * sizeof(HashCode512));
   req->header.size = htons(sizeof(DHT_CS_REQUEST_GET) +
                           (keyCount-1) * sizeof(HashCode512));
@@ -636,7 +636,7 @@
     /* ok, we got some replies! */
     res = (DHT_CS_REPLY_RESULTS*) reply;
     ret = ntohl(res->totalResults);
-    
+
     size = ntohs(reply->size) - sizeof(DHT_CS_REPLY_RESULTS);
     result = MALLOC(size + sizeof(DataContainer));
     result->size = htonl(size + sizeof(DataContainer));
@@ -682,14 +682,14 @@
   sock = getClientSocket();
   if (sock == NULL)
     return SYSERR;
-  req = MALLOC(sizeof(DHT_CS_REQUEST_PUT) + 
-              ntohl(value->size) - 
+  req = MALLOC(sizeof(DHT_CS_REQUEST_PUT) +
+              ntohl(value->size) -
               sizeof(DataContainer));
-  req->header.size 
+  req->header.size
     = htons(sizeof(DHT_CS_REQUEST_PUT) +
            ntohl(value->size) -
            sizeof(DataContainer));
-  req->header.type 
+  req->header.type
     = htons(DHT_CS_PROTO_REQUEST_PUT);
   req->table = *table;
   req->key = *key;

Modified: GNUnet/src/applications/fragmentation/fragmentation.c
===================================================================
--- GNUnet/src/applications/fragmentation/fragmentation.c       2005-03-20 
23:31:34 UTC (rev 463)
+++ GNUnet/src/applications/fragmentation/fragmentation.c       2005-03-20 
23:54:53 UTC (rev 464)
@@ -72,7 +72,7 @@
 
 /**
  * How many buckets does the fragment hash table
- * have?  
+ * have?
  */
 #define DEFRAG_BUCKET_COUNT 16
 
@@ -127,9 +127,9 @@
 static void freeFL(FL * fl,
                   int c) {
   while (fl != NULL) {
-    FL * link = fl->link;    
+    FL * link = fl->link;
     if (stats != NULL)
-      stats->change(stat_discarded, c);    
+      stats->change(stat_discarded, c);
     FREE(fl->frag);
     FREE(fl);
     fl = link;
@@ -191,7 +191,7 @@
   char * msg;
 
   GNUNET_ASSERT(pep != NULL);
-  
+
   pos = pep->head;
   if (pos == NULL)
     return;
@@ -225,7 +225,7 @@
     stats->change(stat_defragmented, 1);
   /* handle message! */
   coreAPI->injectMessage(&pep->sender,
-                        msg,                    
+                        msg,                   
                         len,
                         YES,
                         NULL);
@@ -267,7 +267,7 @@
   unsigned short end;
 
   GNUNET_ASSERT(entry != NULL);
-  if (! hostIdentityEquals(sender, 
+  if (! hostIdentityEquals(sender,
                           &entry->sender))
     return SYSERR; /* wrong fragment list, try another! */
   if (ntohl(packet->id) != entry->id)
@@ -281,12 +281,12 @@
   before = NULL;
   /* find the before-frame */
   while ( (pos != NULL) &&
-         (ntohs(pos->frag->off) < 
+         (ntohs(pos->frag->off) <
           ntohs(packet->off)) ) {
     before = pos;
     pos = pos->link;
   }
-  
+
   /* find the after-frame */
   end = ntohs(packet->off) + ntohs(packet->header.size) - 
sizeof(FRAGMENT_Message);
   if (end <= ntohs(packet->off)) {
@@ -295,11 +295,11 @@
        __FILE__, __LINE__);
     return SYSERR; /* yuck! integer overflow! */
   }
-  
+
   if (before != NULL)
-    after = before; 
+    after = before;
   else
-    after = entry->head; 
+    after = entry->head;
   while ( (after != NULL) &&
          (ntohs(after->frag->off)<end) )
     after = after->link;
@@ -312,12 +312,12 @@
     if (stats != NULL)
       stats->change(stat_defragmented, 1);
     return OK; /* drop, there is a packet that spans our range! */
-  }    
+  }
 
   if ( (before != NULL) &&
        (after != NULL) &&
-       ( (htons(before->frag->off) + 
-         FRAGSIZE(before)) 
+       ( (htons(before->frag->off) +
+         FRAGSIZE(before))
         >= htons(after->frag->off)) ) {
     /* this implies that the fragment that starts before us and the
        fragment that comes after this one leave no space in the middle
@@ -335,19 +335,19 @@
 
   if (before == NULL) {
     pep->link = after;
-    pos = entry->head; 
+    pos = entry->head;
     while (pos != after) {
       tmp = pos->link;
       FREE(pos->frag);
       FREE(pos);
       pos = tmp;
     }
-    entry->head = pep; 
+    entry->head = pep;
     goto FINISH;
     /* end of insert first */
   }
 
-  if (after == NULL) {    
+  if (after == NULL) {
     /* insert last: find the end, free everything after it */
     freeFL(before->link, 1);
     before->link = pep;
@@ -388,7 +388,7 @@
 
   if (ntohs(frag->size) < sizeof(FRAGMENT_Message))
     return SYSERR;
-    
+
   MUTEX_LOCK(&defragCacheLock);
   hash = sender->hashPubKey.bits[0] % DEFRAG_BUCKET_COUNT;
   smf = defragmentationCache[hash];
@@ -405,7 +405,7 @@
     smf = smf->next;
   }
   if (smf == NULL) {
-    smf = MALLOC(sizeof(FC));    
+    smf = MALLOC(sizeof(FC));
     smf->next = defragmentationCache[hash];
     defragmentationCache[hash] = smf;
     smf->ttl = cronTime(NULL) + DEFRAGMENTATION_TIMEOUT;
@@ -415,8 +415,8 @@
   smf->head = MALLOC(sizeof(FL));
   smf->head->link = NULL;
   smf->head->frag = MALLOC(ntohs(frag->size));
-  memcpy(smf->head->frag, 
-        frag, 
+  memcpy(smf->head->frag,
+        frag,
         ntohs(frag->size));
 
   MUTEX_UNLOCK(&defragCacheLock);
@@ -481,7 +481,7 @@
   frag = (FRAGMENT_Message*) buf;
   frag->header.size = htons(len);
   frag->header.type = htons(p2p_PROTO_FRAGMENT);
-  frag->id = id; 
+  frag->id = id;
   frag->off = htons(0);
   frag->len = htons(ctx->len);
   memcpy(&((FRAGMENT_Message_GENERIC*)frag)->data[0],
@@ -491,7 +491,7 @@
   /* create remaining fragments, add to queue! */
   pos = len - sizeof(FRAGMENT_Message);
   frag = MALLOC(ctx->mtu);
-  while (pos < ctx->len) {  
+  while (pos < ctx->len) {
     mlen = sizeof(FRAGMENT_Message) + ctx->len - pos;
     if (mlen > ctx->mtu)
       mlen = ctx->mtu;
@@ -507,7 +507,7 @@
     coreAPI->unicast(&ctx->sender,
                     &frag->header,
                     EXTREME_PRIORITY,
-                    ctx->transmissionTime - cronTime(NULL)); 
+                    ctx->transmissionTime - cronTime(NULL));
     pos += mlen - sizeof(FRAGMENT_Message);
   }
   GNUNET_ASSERT(pos == ctx->len);
@@ -541,7 +541,7 @@
   fbmc->transmissionTime = targetTime;
   fbmc->callback = bmc;
   fbmc->closure = bmcClosure;
-  fbmc->len = len;  
+  fbmc->len = len;
   xlen = mtu - sizeof(FRAGMENT_Message);
   coreAPI->unicastCallback(peer,
                           (BuildMessageCallback) &fragmentBMC,
@@ -566,12 +566,12 @@
     stat_fragmented = stats->create(_("# messages fragmented"));
     stat_discarded = stats->create(_("# fragments discarded"));
   }
-  for (i=0;i<DEFRAG_BUCKET_COUNT;i++) 
+  for (i=0;i<DEFRAG_BUCKET_COUNT;i++)
     defragmentationCache[i] = NULL;
   MUTEX_CREATE(&defragCacheLock);
   addCronJob((CronJob) &defragmentationPurgeCron,
-            60 * cronSECONDS, 
             60 * cronSECONDS,
+            60 * cronSECONDS,
             NULL);
   LOG(LOG_DEBUG,
       _("'%s' registering handler %d\n"),
@@ -589,7 +589,7 @@
  */
 void release_module_fragmentation() {
   int i;
- 
+
   coreAPI->unregisterHandler(p2p_PROTO_FRAGMENT,
                             &processFragment);
   delCronJob((CronJob) &defragmentationPurgeCron,
@@ -602,7 +602,7 @@
       freeFL(pos->head, 1);
       FREE(pos);
       pos = next;
-    }    
+    }
   }
   if (stats != NULL) {
     coreAPI->releaseService(stats);

Modified: GNUnet/src/applications/fragmentation/fragmentationtest.c
===================================================================
--- GNUnet/src/applications/fragmentation/fragmentationtest.c   2005-03-20 
23:31:34 UTC (rev 463)
+++ GNUnet/src/applications/fragmentation/fragmentationtest.c   2005-03-20 
23:54:53 UTC (rev 464)
@@ -53,7 +53,7 @@
 static char resultBuffer[65536];
 
 static void handleHelper(const PeerIdentity * sender,
-                        const char * msg,                
+                        const char * msg,              
                         const unsigned int len,
                         int wasEncrypted,
                         TSession  * ts) {
@@ -74,7 +74,7 @@
 /**
  * Create a fragment. The data-portion will be filled
  * with a sequence of numbers from start+id to start+len-1+id.
- * 
+ *
  * @param pep pointer to the ethernet frame/buffer
  * @param ip pointer to the ip-header
  * @param start starting-offset
@@ -87,16 +87,16 @@
                                 int id) {
   FRAGMENT_Message * frag;
   int i;
-  
+
   frag      = (FRAGMENT_Message*) masterBuffer;
   frag->id  = htonl(id);
   frag->off = htons(start);
   frag->len = htons(tot);
   frag->header.size
     = htons(sizeof(FRAGMENT_Message) + size);
-  
-  for (i=0;i<size;i++) 
-    ((FRAGMENT_Message_GENERIC*)frag)->data[i] 
+
+  for (i=0;i<size;i++)
+    ((FRAGMENT_Message_GENERIC*)frag)->data[i]
       = (char)i+id+start;
   return &frag->header;
 }
@@ -107,14 +107,14 @@
  * @param id the expected id
  * @param len the expected length
  */
-static void checkPacket(int id, 
+static void checkPacket(int id,
                        unsigned int len) {
   int i;
 
   GNUNET_ASSERT(myMsg != NULL);
   GNUNET_ASSERT(myMsgLen == len);
-  for (i=0;i<len;i++) 
-    GNUNET_ASSERT(myMsg[i] == (char) (i+id));  
+  for (i=0;i<len;i++)
+    GNUNET_ASSERT(myMsg[i] == (char) (i+id));
   myMsgLen = 0;
   myMsg = NULL;
 }
@@ -150,7 +150,7 @@
 
 static void testSimpleFragmentReverse() {
   p2p_HEADER * pep;
-  
+
   pep = makeFragment(16, 16, 32, 42);
   processFragment(&mySender, pep);
   GNUNET_ASSERT(myMsg == NULL);
@@ -333,9 +333,9 @@
 
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parser(int argc, 
+static int parser(int argc,
                  char * argv[]) {
   FREENONNULL(setConfigurationString("FILES",
                                     "gnunet.conf",
@@ -356,8 +356,8 @@
 int main(int argc, char * argv[]){
   CoreAPIForApplication capi;
 
-  if (OK != initUtil(argc, argv, &parser)) 
-    return SYSERR;  
+  if (OK != initUtil(argc, argv, &parser))
+    return SYSERR;
 
   memset(&capi, 0, sizeof(CoreAPIForApplication));
   capi.injectMessage = &handleHelper;
@@ -365,7 +365,7 @@
   capi.registerHandler = &registerp2pHandler;
   capi.unregisterHandler = &unregisterp2pHandler;
   provide_module_fragmentation(&capi);
-  
+
   fprintf(stderr, ".");
   testSimpleFragment();
   fprintf(stderr, ".");
@@ -391,7 +391,7 @@
   testLastFragmentEarly();
   fprintf(stderr, ".");
   testManyFragmentsMultiIdCollisions();
-  fprintf(stderr, "."); 
+  fprintf(stderr, ".");
   release_module_fragmentation();
   fprintf(stderr, "\n");
   doneUtil();

Modified: GNUnet/src/applications/fs/ecrs/directory.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/directory.c 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/directory.c 2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/fs/ecrs/directory.c 
+ * @file applications/fs/ecrs/directory.c
  * @brief Helper functions for building directories.
  * @author Christian Grothoff
  */
@@ -61,12 +61,12 @@
        (0 == memcmp(data,
                    GNUNET_DIRECTORY_MAGIC,
                    8)) ) {
-    memcpy(&mdSize, &data[8], sizeof(unsigned int)); 
+    memcpy(&mdSize, &data[8], sizeof(unsigned int));
     mdSize = ntohl(mdSize);
     if (mdSize > len - 8 - sizeof(unsigned int) )
       return SYSERR; /* invalid size */
-    if (OK != ECRS_deserializeMetaData(md, 
-                                      &data[8 + sizeof(unsigned int)], 
+    if (OK != ECRS_deserializeMetaData(md,
+                                      &data[8 + sizeof(unsigned int)],
                                       mdSize)) {
       *md = NULL;
       return SYSERR; /* malformed !*/
@@ -89,17 +89,17 @@
       epos++;
     if (epos == len)
       return SYSERR; /* malformed */
-    
+
     fi.uri = ECRS_stringToUri(&data[pos]);
     pos = epos+1;
-    if (fi.uri == NULL) 
+    if (fi.uri == NULL)
       return SYSERR; /* malformed! */
     if (ECRS_isKeywordURI(fi.uri)) {
       ECRS_freeUri(fi.uri);
       return SYSERR; /* illegal in directory! */
     }
 
-    memcpy(&mdSize, &data[pos], sizeof(unsigned int)); 
+    memcpy(&mdSize, &data[pos], sizeof(unsigned int));
     mdSize = ntohl(mdSize);
 
     pos += sizeof(unsigned int);
@@ -109,11 +109,11 @@
     }
 
     if (OK != ECRS_deserializeMetaData(&fi.meta,
-                                      &data[pos], 
+                                      &data[pos],
                                       mdSize)) {
       ECRS_freeUri(fi.uri);
       return SYSERR; /* malformed !*/
-    }    
+    }
     pos += mdSize;
     count++;
     spcb(&fi, NULL, spcbClosure);
@@ -208,9 +208,9 @@
   for (i=0;i<count;i++) {
     psize = pos;
 
-    pos += strlen(ucs[i]) + 1 + 
+    pos += strlen(ucs[i]) + 1 +
       ECRS_sizeofMetaData(fis[i].meta);
-    pos += sizeof(unsigned int);    
+    pos += sizeof(unsigned int);
     align = (pos / BLOCK_ALIGN_SIZE) * BLOCK_ALIGN_SIZE;
     if ( (psize < align) &&
         (pos > align) ) {
@@ -232,7 +232,7 @@
     memcpy(&(*data)[pos],
           &ret,
           sizeof(unsigned int));
-    pos += ntohl(ret) + sizeof(unsigned int);   
+    pos += ntohl(ret) + sizeof(unsigned int);
   }
   FREE(ucs);
   GNUNET_ASSERT(pos == size);

Modified: GNUnet/src/applications/fs/ecrs/directorytest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/directorytest.c     2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/ecrs/directorytest.c     2005-03-20 23:54:53 UTC 
(rev 464)
@@ -41,7 +41,7 @@
                     const HashCode512 * key,
                     void * cls) {
   struct PCLS * p = cls;
-  
+
   if (ECRS_equalsMetaData(p->fi[p->pos].meta,
                          fi->meta) &&
       ECRS_equalsUri(p->fi[p->pos].uri,
@@ -49,7 +49,7 @@
     p->pos++;
     return OK;
   } else {
-    fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); 
+    fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__);
     return SYSERR;
   }
 }
@@ -123,14 +123,14 @@
 int main(int argc, char * argv[]) {
   int failureCount = 0;
   int i;
-  
-  for (i=17;i<18;i++) 
-    failureCount += testDirectory(i);  
 
+  for (i=17;i<18;i++)
+    failureCount += testDirectory(i);
+
   if (failureCount == 0)
     return 0;
-  else 
+  else
     return 1;
-} 
+}
 
 /* end of directorytest.c */

Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/download.c  2005-03-20 23:54:53 UTC (rev 
464)
@@ -100,20 +100,20 @@
                    int unlinkTreeFiles) {
   int i;
   char * fn;
-  
+
   for (i=0;i<=this->treedepth;i++) {
     if (this->handles[i] != -1) {
       CLOSE(this->handles[i]);
       this->handles[i] = -1;
-    } 
+    }
   }
-  MUTEX_DESTROY(&this->lock);    
+  MUTEX_DESTROY(&this->lock);
   if (YES == unlinkTreeFiles) {
     for (i=1;i<= this->treedepth;i++) {
       fn = MALLOC(strlen(this->filename) + 3);
       strcpy(fn, this->filename);
       strcat(fn, ".A");
-      fn[strlen(fn)-1]+=i;    
+      fn[strlen(fn)-1]+=i;
       if (0 != UNLINK(fn))
        LOG(LOG_WARNING,
            "Could not unlink temporary file %s: %s\n",
@@ -152,8 +152,8 @@
       LOG_FILE_STRERROR(LOG_FAILURE, "truncate", filename);
       return SYSERR;
     }
-  }  
-  for (i=0;i<=this->treedepth;i++) 
+  }
+  for (i=0;i<=this->treedepth;i++)
     this->handles[i] = -1;
 
   for (i=0;i<=this->treedepth;i++) {
@@ -171,7 +171,7 @@
       freeIOC(this, NO);
       FREE(fn);
       return SYSERR;
-    }          
+    }
     FREE(fn);
   }
   return OK;
@@ -185,7 +185,7 @@
  * @param pos position where to read or write
  * @param buf where to read from or write to
  * @param len how many bytes to read or write
- * @return number of bytes read, SYSERR on error  
+ * @return number of bytes read, SYSERR on error
  */
 int readFromIOC(IOContext * this,
                unsigned int level,
@@ -194,16 +194,16 @@
                unsigned int len) {
   int ret;
   size_t lpos;
-  
+
   lpos = pos;
   for (ret=0;ret<level;ret++)
-    lpos /= CHK_PER_INODE;  
+    lpos /= CHK_PER_INODE;
   MUTEX_LOCK(&this->lock);
   lseek(this->handles[level],
        lpos,
        SEEK_SET);
   ret = READ(this->handles[level],
-            buf, 
+            buf,
             len);
   MUTEX_UNLOCK(&this->lock);
   return ret;
@@ -217,7 +217,7 @@
  * @param pos position where to  write
  * @param buf where to write to
  * @param len how many bytes to write
- * @return number of bytes written, SYSERR on error  
+ * @return number of bytes written, SYSERR on error
  */
 int writeToIOC(IOContext * this,
               unsigned int level,
@@ -226,16 +226,16 @@
               unsigned int len) {
   int ret;
   size_t lpos;
-  
-  lpos = pos;  
+
+  lpos = pos;
   for (ret=0;ret<level;ret++)
-    lpos /= CHK_PER_INODE;  
+    lpos /= CHK_PER_INODE;
   MUTEX_LOCK(&this->lock);
   lseek(this->handles[level],
        lpos,
        SEEK_SET);
   ret = WRITE(this->handles[level],
-             buf, 
+             buf,
              len);
   if (ret != len) {
     LOG(LOG_WARNING,
@@ -254,7 +254,7 @@
  * Node-specific data (not shared, keep small!). 56 bytes.
  */
 typedef struct {
-  /** 
+  /**
    * Pointer to shared data between all nodes (request manager,
    * progress data, etc.).
    */
@@ -280,7 +280,7 @@
  * This structure together with the NodeContext determine the memory
  * requirements, so try keeping it as small as possible!  (currently
  * 32 bytes, plus 56 in the NodeContext => roughly 88 byte per block!)
- * 
+ *
  * Estimate: max ~12 MB memory for a 4 GB file in the end (assuming
  * maximum parallelism, which is likely, so we are really going to use
  * about 12 MB, but that should be acceptable).
@@ -294,7 +294,7 @@
    * The node for which this entry keeps data.
    */
   NodeClosure * node;
-  
+
   /**
    * Last time the query was send.
    */
@@ -316,7 +316,7 @@
    * Priority used for the last request.
    */
   unsigned int lastPriority;
-  
+
   /**
    * Search handle of the last request (NULL if never
    * requested).
@@ -330,7 +330,7 @@
  *        a download
  *
  * Handle to the state of a request manager.  Here we keep track of
- * which queries went out with which priorities and which nodes in 
+ * which queries went out with which priorities and which nodes in
  * the merkle-tree are waiting for the replies.
  */
 typedef struct RequestManager {
@@ -342,7 +342,7 @@
 
   /**
    * Current list of all pending requests
-   */ 
+   */
   RequestEntry ** requestList;
 
   /**
@@ -393,7 +393,7 @@
 /**
  * Create a request manager.  Will create the request manager
  * datastructures. Use destroyRequestManager to abort and/or to free
- * resources after the download is complete. 
+ * resources after the download is complete.
  *
  * @return NULL on error
  */
@@ -403,15 +403,15 @@
   rm = MALLOC(sizeof(RequestManager));
   rm->abortFlag
     = NO;
-  rm->lastDET 
+  rm->lastDET
     = 0;
   MUTEX_CREATE_RECURSIVE(&rm->lock);
   rm->sctx = FS_SEARCH_makeContext(&rm->lock);
-  rm->requestListIndex 
+  rm->requestListIndex
     = 0;
-  rm->requestListSize  
+  rm->requestListSize
     = 0;
-  rm->requestList      
+  rm->requestList
     = NULL;
   GROW(rm->requestList,
        rm->requestListSize,
@@ -447,7 +447,7 @@
                     rm->requestList[i]->searchHandle);
     FREE(rm->requestList[i]->node);
     FREE(rm->requestList[i]);
-  }   
+  }
   GROW(rm->requestList,
        rm->requestListSize,
        0);
@@ -467,7 +467,7 @@
   for (i=0;i<rm->requestListIndex;i++) {
     RequestEntry * entry = rm->requestList[i];
     /* cut TTL in half */
-    entry->lasttime 
+    entry->lasttime
       += (entry->lasttime + entry->lastTimeout) / 2;
   }
   MUTEX_UNLOCK(&rm->lock);
@@ -475,7 +475,7 @@
 
 /**
  * Queue a request for execution.
- * 
+ *
  * @param rm the request manager struct from createRequestManager
  * @param node the node to call once a reply is received
  */
@@ -496,18 +496,18 @@
     = MALLOC(sizeof(RequestEntry));
   entry->node
     = node;
-  entry->lasttime 
+  entry->lasttime
     = 0; /* never sent */
-  entry->lastTimeout 
+  entry->lastTimeout
     = 0;
-  entry->tries 
+  entry->tries
     = 0; /* not tried so far */
   entry->lastPriority
     = 0;
   entry->searchHandle
     = NULL;
-  MUTEX_LOCK(&rm->lock);   
-  if (rm->requestListSize == rm->requestListIndex) 
+  MUTEX_LOCK(&rm->lock);
+  if (rm->requestListSize == rm->requestListIndex)
     GROW(rm->requestList,
         rm->requestListSize,
         rm->requestListSize*2);
@@ -517,7 +517,7 @@
 
 
 /**
- * Cancel a request. 
+ * Cancel a request.
  *
  * @param this the request manager struct from createRequestManager
  * @param node the block for which the request is canceled
@@ -526,24 +526,24 @@
                       NodeClosure * node) {
   int i;
   RequestEntry * re;
- 
+
   MUTEX_LOCK(&rm->lock);
   for (i=0;i<rm->requestListIndex;i++) {
     re = rm->requestList[i];
     if (re->node == node) {
-      rm->requestList[i] 
+      rm->requestList[i]
        = rm->requestList[--rm->requestListIndex];
-      rm->requestList[rm->requestListIndex] 
+      rm->requestList[rm->requestListIndex]
        = NULL;
       MUTEX_UNLOCK(&rm->lock);
       if (NULL != re->searchHandle)
        FS_stop_search(rm->sctx,
                       re->searchHandle);
       FREE(re);
-      return; 
+      return;
     }
   }
-  MUTEX_UNLOCK(&rm->lock);  
+  MUTEX_UNLOCK(&rm->lock);
   BREAK(); /* uh uh - at least a memory leak... */
 }
 
@@ -563,20 +563,20 @@
   void * dpcbClosure;
   cron_t startTime;
   unsigned int anonymityLevel;
-  cron_t TTL_DECREMENT; 
+  cron_t TTL_DECREMENT;
 } CommonCtx;
 
 /**
  * Compute how many bytes of data are stored in
  * this node.
  */
-static unsigned int getNodeSize(const NodeClosure * node) {  
+static unsigned int getNodeSize(const NodeClosure * node) {
   unsigned int i;
   unsigned int ret;
   unsigned long long rsize;
   unsigned long long spos;
   unsigned long long epos;
-  
+
   GNUNET_ASSERT(node->offset < node->ctx->total);
   if (node->level == 0) {
     ret = DBLOCK_SIZE;
@@ -630,9 +630,9 @@
     cronTime(&eta); /* now */
     if (node->ctx->completed > 0) {
       eta = (cron_t) (node->ctx->startTime +
-                     (((double)(eta - 
node->ctx->startTime)/(double)node->ctx->completed)) 
+                     (((double)(eta - 
node->ctx->startTime)/(double)node->ctx->completed))
                      * (double)node->ctx->total);
-    } 
+    }
     if (node->ctx->dpcb != NULL) {
       node->ctx->dpcb(node->ctx->total,
                      node->ctx->completed,
@@ -642,14 +642,14 @@
                      size,
                      node->ctx->dpcbClosure);
     }
-  } 
+  }
   rm = node->ctx->rm;
 
   /* check type of reply msg, fill in query */
-  pos = -1;  
+  pos = -1;
   /* find which query matches the reply, call the callback
      and recycle the slot */
-  for (i=0;i<rm->requestListIndex;i++) 
+  for (i=0;i<rm->requestListIndex;i++)
     if (rm->requestList[i]->node == node)
       pos = i;
   if (pos == -1) {
@@ -657,7 +657,7 @@
     return;
   }
   entry = rm->requestList[pos];
-  
+
   if ( (entry->lasttime < cronTime(NULL)) &&
        (entry->lasttime != 0) ) {
     unsigned int weight = 15;
@@ -667,8 +667,8 @@
       weight = 127;
       /* eTTL is MUCH bigger than what we currently expect AND the time
         between the last query and the reply was in the range of the
-        expected TTL => don't take ettl too much into account! */   
-    }     
+        expected TTL => don't take ettl too much into account! */
+    }
     rm->initialTTL = ((rm->initialTTL) * weight + ettl) / (weight+1);
 
     /* RFC 2001: increase cwnd; note that we can't really discriminate between
@@ -677,21 +677,21 @@
       rm->congestionWindow += 2; /* slow start */
     else
       rm->congestionWindow += 1; /* slower start :-) */
-  } 
+  }
   if (entry->tries > 1) {
     TIME_T nowTT;
-    
+
     TIME(&nowTT);
     if ( (nowTT - rm->initialTTL) > rm->lastDET) {
       /* only consider congestion control every
         "average" TTL seconds, otherwise the system
         reacts to events that are far too old! */
       /* we performed retransmission, treat as congestion (RFC 2001) */
-      rm->ssthresh 
+      rm->ssthresh
        = rm->congestionWindow / 2;
       if (rm->ssthresh < 2)
        rm->ssthresh = 2;
-      rm->congestionWindow 
+      rm->congestionWindow
        = rm->ssthresh + 1;
       rm->lastDET = nowTT;
     }
@@ -701,7 +701,7 @@
 
 /**
  * Download children of this IBlock.
- * 
+ *
  * @param rm the node that should downloaded
  */
 static void iblock_download_children(NodeClosure * node,
@@ -731,21 +731,21 @@
                    size);
   if (res == size) {
     HashCode512 hc;
-    
+
     hash(data,
         size,
         &hc);
     if (equalsHashCode512(&hc,
                          &node->chk.key)) {
       updateProgress(node, data, size);
-      if (node->level > 0) 
+      if (node->level > 0)
        iblock_download_children(node,
                                 data,
                                 size);
-      
+
       FREE(data);
       return YES;
-    }    
+    }
   }
   FREE(data);
   return NO;
@@ -753,7 +753,7 @@
 
 /**
  * Download children of this IBlock.
- * 
+ *
  * @param this the node that should downloaded
  */
 static void iblock_download_children(NodeClosure * node,
@@ -765,7 +765,7 @@
   CHK * chks;
   unsigned int levelSize;
   unsigned long long baseOffset;
- 
+
   GNUNET_ASSERT(node->level > 0);
   childcount = size / sizeof(CHK);
   if (size != childcount * sizeof(CHK)) {
@@ -794,7 +794,7 @@
                 child);
     else
       FREE(child); /* done already! */
-  }  
+  }
 }
 
 
@@ -886,7 +886,7 @@
          "file. Download aborted.\n"));
     node->ctx->rm->abortFlag = YES;
     return SYSERR;
-  } 
+  }
   if (size != writeToIOC(node->ctx->ioc,
                         node->level,
                         node->offset,
@@ -896,15 +896,15 @@
     node->ctx->rm->abortFlag = YES;
     return SYSERR;
   }
-  updateProgress(node, 
-                data, 
+  updateProgress(node,
+                data,
                 size);
   if (node->level > 0)
     iblock_download_children(node,
                             data,
                             size);
-  
 
+
   for (i=0;i<10;i++) {
     if ( (node->ctx->completed * 10000L >
          node->ctx->total * (10000L - (1024 >> i)) ) &&
@@ -931,7 +931,7 @@
                         int requestIndex) {
   static unsigned int lastmpriority;
   static cron_t lastmpritime;
-  RequestEntry * entry; 
+  RequestEntry * entry;
   cron_t now;
   unsigned int priority;
   unsigned int mpriority;
@@ -955,7 +955,7 @@
     sock = getClientSocket();
     lastmpriority = FS_getAveragePriority(sock);
     lastmpritime = now;
-    releaseClientSocket(sock);    
+    releaseClientSocket(sock);
   }
   mpriority = lastmpriority;
   priority
@@ -973,11 +973,11 @@
 
   /* compute TTL */
 
-  TTL_DECREMENT 
+  TTL_DECREMENT
     = entry->node->ctx->TTL_DECREMENT;
 
-  if (entry->lastTimeout + TTL_DECREMENT > now) 
-    BREAK(); 
+  if (entry->lastTimeout + TTL_DECREMENT > now)
+    BREAK();
   if (entry->lasttime == 0) {
     timeout = now + rm->initialTTL;
   } else {
@@ -996,14 +996,14 @@
       rd = TTL_DECREMENT / rd;
       if (rd == 0)
        rd = 1;
-      ttl += randomi(50 * cronMILLIS + rd); 
-      /* rd == TTL_DECREMENT / (con->ttl / rm->initialTTL) + saveguards 
+      ttl += randomi(50 * cronMILLIS + rd);
+      /* rd == TTL_DECREMENT / (con->ttl / rm->initialTTL) + saveguards
         50ms: minimum increment */
     } else {
       ttl += randomi(ttl + 2 * TTL_DECREMENT); /* exponential backoff with 
random factor */
     }
-    if (ttl > (priority+8)* TTL_DECREMENT) 
-      ttl = (priority+8) * TTL_DECREMENT; /* see adjustTTL in gap */    
+    if (ttl > (priority+8)* TTL_DECREMENT)
+      ttl = (priority+8) * TTL_DECREMENT; /* see adjustTTL in gap */
     timeout = now + ttl;
   }
 
@@ -1060,7 +1060,7 @@
   cron_t minSleep;
   cron_t now;
   cron_t delta;
-  int i;  
+  int i;
   unsigned int pending;
   int * perm;
   unsigned int TTL_DECREMENT;
@@ -1097,11 +1097,11 @@
        pendingOverCWin = -1; /* avoid 0! */
       pOCWCubed = pendingOverCWin *
        pendingOverCWin *
-       pendingOverCWin;     
+       pendingOverCWin;
       if ( (pOCWCubed <= 0) ||
           (pOCWCubed * rm->requestListIndex <= 0) /* see #642 */ ||
           /* avoid no-start: override congestionWindow occasionally... */
-          (0 == randomi(rm->requestListIndex * 
+          (0 == randomi(rm->requestListIndex *
                         pOCWCubed)) ) {
        delta = (rm->requestList[j]->lastTimeout - now) + 10 * cronMILLIS;
        issueRequest(rm, j);
@@ -1111,7 +1111,7 @@
       }
     } else {
       delta = (rm->requestList[j]->lastTimeout + TTL_DECREMENT - now);
-    }      
+    }
     if (delta < minSleep )
       minSleep = delta;
   }
@@ -1127,7 +1127,7 @@
 /* ***************** main method **************** */
 
 /**
- * Download a file. 
+ * Download a file.
  *
  * @param uri the URI of the file (determines what to download)
  * @param filename where to store the file
@@ -1152,7 +1152,7 @@
 
   if (OK != createIOContext(&ioc,
                            ntohll(fid.file_length),
-                           filename)) 
+                           filename))
     return SYSERR;
   rm = createRequestManager();
 
@@ -1179,9 +1179,9 @@
   if ( (rm->requestListIndex == 0) &&
        (ctx.completed == ctx.total) &&
        (rm->abortFlag == NO) )
-    ret = OK;    
-  else 
-    ret = SYSERR;  
+    ret = OK;
+  else
+    ret = SYSERR;
   destroyRequestManager(rm);
   if (ret == OK)
     freeIOC(&ioc, YES);

Modified: GNUnet/src/applications/fs/ecrs/ecrs.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/ecrs.c      2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/ecrs.c      2005-03-20 23:54:53 UTC (rev 
464)
@@ -54,7 +54,7 @@
   char * tmp;
   SESSIONKEY skey;
   INITVECTOR iv;
-  
+
   hashToKey(hc, &skey, &iv);
   tmp = MALLOC(len);
   GNUNET_ASSERT(len ==

Modified: GNUnet/src/applications/fs/ecrs/ecrs.h
===================================================================
--- GNUnet/src/applications/fs/ecrs/ecrs.h      2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/ecrs.h      2005-03-20 23:54:53 UTC (rev 
464)
@@ -35,8 +35,8 @@
 
 
 /**
- * Fixed SBlock updateInterval codes. Positive values 
- * are interpreted as durations (in seconds) for periodical 
+ * Fixed SBlock updateInterval codes. Positive values
+ * are interpreted as durations (in seconds) for periodical
  * updates.
  */
 #define SBLOCK_UPDATE_SPORADIC ECRS_SBLOCK_UPDATE_SPORADIC
@@ -92,7 +92,7 @@
 void ECRS_decryptInPlace(const HashCode512 * hc,
                         void * data,
                         unsigned int len);
- 
 
 
+
 #endif

Modified: GNUnet/src/applications/fs/ecrs/ecrstest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/ecrstest.c  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/ecrstest.c  2005-03-20 23:54:53 UTC (rev 
464)
@@ -18,7 +18,7 @@
      Boston, MA 02111-1307, USA.
 */
 
-/** 
+/**
  * @file applications/fs/ecrs/ecrstest.c
  * @brief testcase for ecrs (upload-download)
  * @author Christian Grothoff
@@ -32,7 +32,7 @@
 
 #define CHECK(a) if (!(a)) { ok = NO; BREAK(); goto FAILURE; }
 
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   FREENONNULL(setConfigurationString("GNUNETD",
                                     "_MAGIC_",
@@ -76,12 +76,12 @@
   char * buf;
   struct ECRS_URI * uri;
   int i;
-  
+
   name = makeName(size);
   fd = OPEN(name, O_WRONLY|O_CREAT, S_IWUSR|S_IRUSR);
   buf = MALLOC(size);
   memset(buf, size + size / 253, size);
-  for (i=0;i<(int) (size - 42 - sizeof(HashCode512));i+=sizeof(HashCode512)) 
+  for (i=0;i<(int) (size - 42 - sizeof(HashCode512));i+=sizeof(HashCode512))
     hash(&buf[i+sizeof(HashCode512)],
         42,
         (HashCode512*) &buf[i]);
@@ -94,7 +94,7 @@
                        0, /* prio */
                        cronTime(NULL) + 10 * cronMINUTES, /* expire */
                        NULL, /* progress */
-                       NULL, 
+                       NULL,
                        &testTerminate,
                        NULL,
                        &uri);
@@ -116,7 +116,7 @@
                             meta);
     ECRS_freeMetaData(meta);
     ECRS_freeUri(uri);
-    FREE(name);  
+    FREE(name);
     if (ret == OK) {
       return key;
     } else {
@@ -124,7 +124,7 @@
       return NULL;
     }
   } else {
-    FREE(name);  
+    FREE(name);
     return NULL;
   }
 }
@@ -134,12 +134,12 @@
                    void * closure) {
   struct ECRS_URI ** my = closure;
   char * tmp;
-  
+
   tmp = ECRS_uriToString(fi->uri);
   LOG(LOG_DEBUG,
       "Search found URI '%s'\n",
       tmp);
-  FREE(tmp);    
+  FREE(tmp);
   GNUNET_ASSERT(NULL == *my);
   *my = ECRS_dupUri(fi->uri);
   return SYSERR; /* abort search */
@@ -167,7 +167,7 @@
        (myURI != NULL) )
     return OK;
   else
-    return SYSERR;  
+    return SYSERR;
 }
 
 static int downloadFile(unsigned int size,
@@ -179,7 +179,7 @@
   char * in;
   int i;
   char * tmp;
-  
+
   tmp = ECRS_uriToString(uri);
   LOG(LOG_DEBUG,
       "Starting download of '%s'\n",
@@ -194,12 +194,12 @@
                              NULL,
                              &testTerminate,
                              NULL)) {
-    
+
     fd = OPEN(tmpName, O_RDONLY);
     buf = MALLOC(size);
     in = MALLOC(size);
     memset(buf, size + size / 253, size);
-    for (i=0;i<(int) (size - 42 - sizeof(HashCode512));i+=sizeof(HashCode512)) 
+    for (i=0;i<(int) (size - 42 - sizeof(HashCode512));i+=sizeof(HashCode512))
       hash(&buf[i+sizeof(HashCode512)],
           42,
           (HashCode512*) &buf[i]);
@@ -211,7 +211,7 @@
       ret = OK;
     FREE(buf);
     FREE(in);
-    CLOSE(fd); 
+    CLOSE(fd);
   }
   UNLINK(tmpName);
   FREE(tmpName);
@@ -222,7 +222,7 @@
 static int unindexFile(unsigned int size) {
   int ret;
   char * name;
-  
+
   name = makeName(size);
   ret = ECRS_unindexFile(name,
                         NULL,
@@ -231,7 +231,7 @@
                         NULL);
   if (0 != UNLINK(name))
     ret = SYSERR;
-  FREE(name);  
+  FREE(name);
   return ret;
 }
 
@@ -250,8 +250,8 @@
     2,
     4,
     16,
-    32, 
-    1024, 
+    32,
+    1024,
     0
   };
   pid_t daemon;
@@ -283,7 +283,7 @@
   gnunet_util_sleep(5 * cronSECONDS); /* give gnunetd time to start */
   sock = getClientSocket();
   CHECK(sock != NULL);
-  
+
   /* ACTUAL TEST CODE */
   i = 0;
   while (filesizes[i] != 0) {
@@ -299,7 +299,7 @@
     fprintf(stderr,
            " Ok.\n");
     i++;
-  } 
+  }
 
   /* END OF TEST CODE */
  FAILURE:
@@ -310,14 +310,14 @@
   if (daemon != -1) {
     if (0 != kill(daemon, SIGTERM))
       DIE_STRERROR("kill");
-    if (daemon != waitpid(daemon, &status, 0)) 
+    if (daemon != waitpid(daemon, &status, 0))
       DIE_STRERROR("waitpid");
-    
-    if ( (WEXITSTATUS(status) == 0) && 
+
+    if ( (WEXITSTATUS(status) == 0) &&
         (ok == YES) )
       return 0;
     else
-      return 1;    
+      return 1;
   } else {
     return 0;
   }

Modified: GNUnet/src/applications/fs/ecrs/indexinfo.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/indexinfo.c 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/indexinfo.c 2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/fs/ecrs/indexinfo.c 
+ * @file applications/fs/ecrs/indexinfo.c
  * @brief information about indexed files
  * @author Christian Grothoff
  */
@@ -69,7 +69,7 @@
 
   if (cls->cnt == SYSERR)
     return;
-  
+
   // FIXME: implement!
   cls->cnt++;
   if (OK != cls->iterator(lnkName,
@@ -79,11 +79,11 @@
 }
 
 /**
- * Iterate over all indexed files.  
+ * Iterate over all indexed files.
  *
  * This function will ONLY work if gnunetd runs on the
  * same machine as the current process and if the indexed
- * files could be symlinked.  If indexed files had to be 
+ * files could be symlinked.  If indexed files had to be
  * uploaded to a remote machine or copied, the original
  * names will have been lost.  In that case, the iterator
  * will NOT iterate over these files.

Modified: GNUnet/src/applications/fs/ecrs/keyspace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/keyspace.c  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/keyspace.c  2005-03-20 23:54:53 UTC (rev 
464)
@@ -74,7 +74,7 @@
                 &enc));
   ECRS_decryptInPlace(key,
                      &kb[1],
-                     size - sizeof(KBlock));  
+                     size - sizeof(KBlock));
   j = sizeof(KBlock);
   while ( (j < size) &&
          (((const char*)kb)[j] != '\0') )
@@ -99,7 +99,7 @@
   }
   ECRS_freeUri(fi.uri);
   ECRS_freeMetaData(fi.meta);
-  return OK;      
+  return OK;
 }
 
 #endif
@@ -146,7 +146,7 @@
   size = mdsize + sizeof(KBlock) + strlen(dstURI) + 1;
   if (size > MAX_KBLOCK_SIZE) {
     size = MAX_KBLOCK_SIZE;
-    value = MALLOC(sizeof(Datastore_Value) + 
+    value = MALLOC(sizeof(Datastore_Value) +
                   size);
     kb = (KBlock*) &value[1];
     kb->type = htonl(K_BLOCK);
@@ -165,7 +165,7 @@
     }
     size = sizeof(KBlock) + strlen(dstURI) + 1 + mdsize;
   } else {
-    value = MALLOC(sizeof(Datastore_Value) + 
+    value = MALLOC(sizeof(Datastore_Value) +
                   size);
     kb = (KBlock*) &value[1];
     kb->type = htonl(K_BLOCK);
@@ -177,7 +177,7 @@
                                         &((char*)&kb[1])[strlen(dstURI)+1],
                                         mdsize,
                                         NO));
-  }  
+  }
   value->size = htonl(sizeof(Datastore_Value) + size);
   value->type = htonl(K_BLOCK);
   value->prio = htonl(priority);
@@ -185,7 +185,7 @@
   value->expirationTime = htonll(expirationTime);
   sock = getClientSocket();
   ret = OK;
-  
+
   keywords = uri->data.ksk.keywords;
   keywordCount = uri->data.ksk.keywordCount;
   cpy = MALLOC(mdsize + strlen(dstURI) + 1);

Modified: GNUnet/src/applications/fs/ecrs/meta.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/meta.c      2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/meta.c      2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/fs/ecrs/meta.c 
+ * @file applications/fs/ecrs/meta.c
  * @brief Meta-data handling
  * @author Christian Grothoff
  */
@@ -45,7 +45,7 @@
  */
 void ECRS_freeMetaData(MetaData * md) {
   int i;
-  for (i=0;i<md->itemCount;i++) 
+  for (i=0;i<md->itemCount;i++)
     FREE(md->items[i].data);
   GROW(md->items,
        md->itemCount,
@@ -101,7 +101,7 @@
        continue;
       }
       return OK;
-    }      
+    }
   }
   return ret;
 }
@@ -109,7 +109,7 @@
 /**
  * Iterate over MD entries, excluding thumbnails.
  *
- * @return number of entries 
+ * @return number of entries
  */
 int ECRS_getMetaData(const MetaData * md,
                     ECRS_MetaDataIterator iterator,
@@ -134,13 +134,13 @@
 /**
  * Iterate over MD entries
  *
- * @return number of entries 
+ * @return number of entries
  */
 char * ECRS_getFromMetaData(const MetaData * md,
                            EXTRACTOR_KeywordType type) {
   int i;
 
-  for (i=md->itemCount-1;i>=0;i--) 
+  for (i=md->itemCount-1;i>=0;i--)
     if (type == md->items[i].type)
       return STRDUP(md->items[i].data);
   return NULL;
@@ -148,7 +148,7 @@
 
 /**
  * This function can be used to decode the binary data
- * stream produced by the thumbnailextractor. 
+ * stream produced by the thumbnailextractor.
  *
  * @param in 0-terminated string from the meta-data
  * @return 1 on error, 0 on success
@@ -163,7 +163,7 @@
   size_t i;
   size_t end;
   size_t inSize;
-  
+
   inSize = strlen(in);
   if (inSize == 0) {
     *out = NULL;
@@ -173,7 +173,7 @@
 
   buf = malloc(inSize); /* slightly more than needed ;-) */
   *out = buf;
-  
+
   pos = 0;
   wpos = 0;
   while (pos < inSize) {
@@ -181,7 +181,7 @@
     if (end > inSize)
       end = inSize;
     marker = in[pos++];
-    for (i=pos;i<end;i++) 
+    for (i=pos;i<end;i++)
       buf[wpos++] = (in[i] == marker) ? 0 : in[i];
     pos = end;
   }
@@ -231,16 +231,16 @@
   if (md == NULL)
     return NULL;
   ret = ECRS_createMetaData();
-  for (i=md->itemCount-1;i>=0;i--) 
+  for (i=md->itemCount-1;i>=0;i--)
     ECRS_addToMetaData(ret,
                       md->items[i].type,
                       md->items[i].data);
   return ret;
 }
-                  
+               
 /**
- * Extract meta-data from a file.  
- * 
+ * Extract meta-data from a file.
+ *
  * @return SYSERR on error, otherwise the number
  *   of meta-data items obtained
  */
@@ -299,7 +299,7 @@
                         unsigned int outputSize) {
   char * output;
   uLongf olen;
-  
+
   olen = outputSize;
   output = MALLOC(olen);
   if (Z_OK == uncompress(output,
@@ -330,7 +330,7 @@
    * compression.
    */
   unsigned int version;
-  
+
   /**
    * How many MD entries are there?
    */
@@ -354,10 +354,10 @@
  * Serialize meta-data to target.
  *
  * @param size maximum number of bytes available
- * @param part is it ok to just write SOME of the 
+ * @param part is it ok to just write SOME of the
  *        meta-data to match the size constraint,
  *        possibly discarding some data? YES/NO.
- * @return number of bytes written on success, 
+ * @return number of bytes written on success,
  *         SYSERR on error (typically: not enough
  *         space)
  */
@@ -370,7 +370,7 @@
   size_t pos;
   int i;
   int len;
-  unsigned int ic;  
+  unsigned int ic;
 
   if (max < sizeof(MetaDataHeader))
     return SYSERR; /* far too small */
@@ -392,7 +392,7 @@
     pos = sizeof(MetaDataHeader);
     pos += sizeof(unsigned int) * md->itemCount;
     for (i=0;i<ic;i++) {
-      len = strlen(md->items[i].data) + 1; 
+      len = strlen(md->items[i].data) + 1;
       memcpy(&((char*)hdr)[pos],
             md->items[i].data,
             len);
@@ -415,7 +415,7 @@
     }
 
     /* partial serialization ok, try again with less meta-data */
-    if (size > 2 * max) 
+    if (size > 2 * max)
       ic = ic * 2 / 3; /* stil far too big, make big reductions */
     else
       ic--; /* small steps, we're close */
@@ -432,7 +432,7 @@
     GNUNET_ASSERT(OK == ECRS_deserializeMetaData(&md,
                                                 target,
                                                 size));
-    ECRS_freeMetaData(md);    
+    ECRS_freeMetaData(md);
   }
 #endif
   return size;
@@ -450,7 +450,7 @@
   size_t pos;
   int i;
   int len;
-  unsigned int ic;  
+  unsigned int ic;
 
   ic = md->itemCount;
   size = sizeof(MetaDataHeader);
@@ -467,7 +467,7 @@
   pos = sizeof(MetaDataHeader);
   pos += sizeof(unsigned int) * md->itemCount;
   for (i=0;i<ic;i++) {
-    len = strlen(md->items[i].data) + 1; 
+    len = strlen(md->items[i].data) + 1;
     memcpy(&((char*)hdr)[pos],
           md->items[i].data,
           len);
@@ -476,7 +476,7 @@
 
   pos = tryCompression((char*)&hdr[1],
                       size - sizeof(MetaDataHeader));
-  if (pos < size - sizeof(MetaDataHeader)) 
+  if (pos < size - sizeof(MetaDataHeader))
     size = pos + sizeof(MetaDataHeader);
 
   FREE(hdr);
@@ -486,7 +486,7 @@
 /**
  * Deserialize meta-data.  Initializes md.
  * @param size number of bytes available
- * @return OK on success, SYSERR on error (i.e. 
+ * @return OK on success, SYSERR on error (i.e.
  *         bad format)
  */
 int ECRS_deserializeMetaData(MetaData ** md,
@@ -520,8 +520,8 @@
                      size - sizeof(MetaDataHeader),
                      dataSize);
     if (data == NULL) {
-      BREAK(); 
-      return SYSERR; 
+      BREAK();
+      return SYSERR;
     }
   } else {
     data = (char*) &hdr[1];
@@ -549,7 +549,7 @@
     len = strlen(&data[pos])+1;
     ECRS_addToMetaData(*md,
                       (EXTRACTOR_KeywordType) ntohl(((unsigned int*)data)[i]),
-                      &data[pos]);    
+                      &data[pos]);
     pos += len;
     i++;
   }
@@ -561,25 +561,25 @@
     FREE(data);
   return OK;
  FAILURE:
-  if (compressed) 
+  if (compressed)
     FREE(data);
-  return SYSERR; /* size too small */  
+  return SYSERR; /* size too small */
 }
 
 /**
  * Does the meta-data claim that this is a directory?
  * Checks if the mime-type is that of a GNUnet directory.
- */ 
+ */
 int ECRS_isDirectory(MetaData * md) {
   int i;
 
-  for (i=md->itemCount-1;i>=0;i--) 
+  for (i=md->itemCount-1;i>=0;i--)
     if ( (md->items[i].type == EXTRACTOR_MIMETYPE) &&
         (0 == strcmp(md->items[i].data,
                      GNUNET_DIRECTORY_MIME)) )
       return YES;
     else
-      return NO;   
+      return NO;
   return SYSERR;
 }
 
@@ -590,7 +590,7 @@
   { "application/msword", ".doc" },
   { "application/ogg", ".ogg" },
   { "application/pdf", ".pdf" },
-  { "application/pgp-keys", ".key" }, 
+  { "application/pgp-keys", ".key" },
   { "application/pgp-signature", ".pgp" },
   { "application/postscript", ".ps" },
   { "application/rar", ".rar" },
@@ -620,7 +620,7 @@
   { "image/gif", ".gif"},
   { "image/jpeg", ".jpg"},
   { "image/pcx", ".pcx"},
-  { "image/png", ".png"}, 
+  { "image/png", ".png"},
   { "image/tiff", ".tiff" },
   { "image/x-ms-bmp", ".bmp"},
   { "image/x-xpixmap", ".xpm"},
@@ -661,7 +661,7 @@
   int i;
   char * renameTo;
   char * ret;
-  
+
   ret = NULL;
   l = EXTRACTOR_loadDefaultLibraries();
   list = EXTRACTOR_getKeywords(l, filename);
@@ -708,15 +708,15 @@
     renameTo = MALLOC(strlen(key) + strlen(mime) + 1);
     strcpy(renameTo, key);
     strcat(renameTo, mime);
-  }   
+  }
   for (i=strlen(renameTo)-1;i>=0;i--)
     if (! isprint(renameTo[i]))
-      renameTo[i] = '_';    
+      renameTo[i] = '_';
   if (0 != strcmp(renameTo, filename)) {
     struct stat filestat;
     if (0 != STAT(renameTo,
                  &filestat)) {
-      if (0 != RENAME(filename, renameTo))       
+      if (0 != RENAME(filename, renameTo))     
        LOG(LOG_ERROR,
            _("Renaming of file '%s' to '%s' failed: %s\n"),
            filename, renameTo, strerror(errno));
@@ -728,9 +728,9 @@
          filename, renameTo);
     }  
   }
-  FREE(renameTo);                                
+  FREE(renameTo);                              
   EXTRACTOR_freeKeywords(list);
-  EXTRACTOR_removeAll(l);    
+  EXTRACTOR_removeAll(l);
   return ret;
 }
 

Modified: GNUnet/src/applications/fs/ecrs/metatest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/metatest.c  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/metatest.c  2005-03-20 23:54:53 UTC (rev 
464)
@@ -113,11 +113,11 @@
                                   EXTRACTOR_UNKNOWN,
                                   val))
       ABORT();
-  } 
+  }
   FREE(val);
   if (0 != ECRS_getMetaData(m, NULL, NULL))
     ABORT();
-  
+
   ECRS_freeMetaData(m);
   return 0;
 }
@@ -153,16 +153,16 @@
 int main(int argc, char * argv[]) {
   int failureCount = 0;
   int i;
-  
-  for (i=0;i<255;i++) 
-    failureCount += testMeta(i);  
-  for (i=1;i<255;i++) 
-    failureCount += testMetaMore(i);  
 
+  for (i=0;i<255;i++)
+    failureCount += testMeta(i);
+  for (i=1;i<255;i++)
+    failureCount += testMetaMore(i);
+
   if (failureCount == 0)
     return 0;
-  else 
+  else
     return 1;
-} 
+}
 
 /* end of metatest.c */

Modified: GNUnet/src/applications/fs/ecrs/namespace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/namespace.c 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/namespace.c 2005-03-20 23:54:53 UTC (rev 
464)
@@ -88,7 +88,7 @@
  * @param meta meta-data for the namespace advertisement
  * @param rootEntry name of the root entry in the namespace (for
  *        the namespace advertisement)
- * @param rootURI set to the URI of the namespace, NULL if 
+ * @param rootURI set to the URI of the namespace, NULL if
  *        no advertisement was created
  *
  * @return OK on success, SYSERR on error (namespace already exists)
@@ -146,14 +146,14 @@
             "600");
   FREE(fileName);
   FREE(dst);
-  
+
   /* create advertisements */
 
   mdsize = ECRS_sizeofMetaData(meta);
   size = mdsize + sizeof(NBlock);
   if (size > MAX_NBLOCK_SIZE) {
     size = MAX_NBLOCK_SIZE;
-    value = MALLOC(sizeof(Datastore_Value) + 
+    value = MALLOC(sizeof(Datastore_Value) +
                   size);
     nb = (NBlock*) &value[1];
     nb->type = htonl(N_BLOCK);
@@ -170,7 +170,7 @@
     }
     size = sizeof(NBlock) + mdsize;
   } else {
-    value = MALLOC(sizeof(Datastore_Value) + 
+    value = MALLOC(sizeof(Datastore_Value) +
                   size);
     nb = (NBlock*) &value[1];
     nb->type = htonl(N_BLOCK);
@@ -178,7 +178,7 @@
                           (char*)&nb[1],
                           mdsize,
                           NO);
-  }  
+  }
   value->size = htonl(sizeof(Datastore_Value) + size);
   value->type = htonl(N_BLOCK);
   value->prio = htonl(priority);
@@ -186,9 +186,9 @@
   value->expirationTime = htonll(expiration);
   sock = getClientSocket();
   ret = OK;
-    
+
   /* publish NBlock */
-  memset(&nb->identifier, 0, sizeof(HashCode512));  
+  memset(&nb->identifier, 0, sizeof(HashCode512));
   getPublicKey(hk,
               &nb->subspace);
   hash(&nb->subspace,
@@ -198,7 +198,7 @@
   (*rootURI)->type = sks;
   (*rootURI)->data.sks.namespace = nb->namespace;
   (*rootURI)->data.sks.identifier = *rootEntry;
-  
+
   nb->rootEntry = *rootEntry;
 
   GNUNET_ASSERT(OK == sign(hk,
@@ -206,13 +206,13 @@
                           &nb->identifier,
                           &nb->signature));
   if (OK != FS_insert(sock, value))
-    ret = SYSERR;  
-  
+    ret = SYSERR;
 
+
   /* publish KNBlocks */
   size += sizeof(KNBlock) - sizeof(NBlock);
   knvalue = MALLOC(sizeof(Datastore_Value) + size);
-  *knvalue = *value;  
+  *knvalue = *value;
   knvalue->type = htonl(KN_BLOCK);
   knvalue->size = htonl(sizeof(Datastore_Value) + size);
   knb = (KNBlock*) &knvalue[1];
@@ -220,7 +220,7 @@
   memcpy(&knb->nblock,
         &nb,
         sizeof(NBlock) + mdsize);
-  
+
   keywords = advertisementURI->data.ksk.keywords;
   keywordCount = advertisementURI->data.ksk.keywordCount;
   for (i=0;i<keywordCount;i++) {
@@ -245,10 +245,10 @@
       ret = SYSERR;
     FREE(keywords[i]);
   }
-  GROW(keywords, keywordCount, 0);  
+  GROW(keywords, keywordCount, 0);
   FREE(knvalue);
   releaseClientSocket(sock);
-  FREE(value); 
+  FREE(value);
 
   freePrivateKey(hk);
   if (ret != OK) {
@@ -302,7 +302,7 @@
     return SYSERR;
   getPublicKey(hk,
               &pk);
-  freePrivateKey(hk);  
+  freePrivateKey(hk);
   hash(&pk, sizeof(PublicKey), &namespace);
   if ( (hc == NULL) ||
        (equalsHashCode512(hc,
@@ -374,12 +374,12 @@
     return SYSERR;
 
   /* THEN: construct SBlock */
-  dstURI = ECRS_uriToString(dstU); 
+  dstURI = ECRS_uriToString(dstU);
   mdsize = ECRS_sizeofMetaData(md);
   size = mdsize + sizeof(SBlock);
   if (size > MAX_SBLOCK_SIZE) {
     size = MAX_SBLOCK_SIZE;
-    value = MALLOC(sizeof(Datastore_Value) + 
+    value = MALLOC(sizeof(Datastore_Value) +
                   size);
     sb = (SBlock*) &value[1];
     sb->type = htonl(S_BLOCK);
@@ -398,7 +398,7 @@
     }
     size = sizeof(SBlock) + mdsize;
   } else {
-    value = MALLOC(sizeof(Datastore_Value) + 
+    value = MALLOC(sizeof(Datastore_Value) +
                   size);
     sb = (SBlock*) &value[1];
     sb->type = htonl(S_BLOCK);
@@ -409,7 +409,7 @@
                           &((char*)&sb[1])[strlen(dstURI)+1],
                           mdsize,
                           NO);
-  }  
+  }
   value->size = htonl(sizeof(Datastore_Value) + size);
   value->type = htonl(S_BLOCK);
   value->prio = htonl(priority);
@@ -422,7 +422,7 @@
   sb->nextIdentifier = *nextId;
 
   deltaId(thisId,
-         nextId,         
+         nextId,       
          &sb->identifierIncrement);
   hash(thisId,
        sizeof(HashCode512),
@@ -440,12 +440,12 @@
   (*uri)->type = sks;
   (*uri)->data.sks.namespace = namespace;
   (*uri)->data.sks.identifier = *thisId;
-  
+
   ECRS_encryptInPlace(thisId,
                      &sb->creationTime,
                      size
                      - sizeof(Signature)
-                     - sizeof(PublicKey) 
+                     - sizeof(PublicKey)
                      - sizeof(HashCode512));
 
   /* FINALLY: sign & publish SBlock */
@@ -453,7 +453,7 @@
                           sizeof(SBlock) - sizeof(Signature) - 
sizeof(PublicKey) - sizeof(unsigned int),
                           &sb->identifier,
                           &sb->signature));
-  freePrivateKey(hk);  
+  freePrivateKey(hk);
 
   sock = getClientSocket();
   ret = OK;
@@ -462,7 +462,7 @@
     FREE(*uri);
   }
   releaseClientSocket(sock);
-  FREE(value); 
+  FREE(value);
   FREE(dstURI);
 
   return ret;
@@ -491,7 +491,7 @@
 
   fileName = getPseudonymFileName(name);
   len = getFileSize(fileName);
-  if (len < 2) {   
+  if (len < 2) {
     LOG(LOG_ERROR,
         _("File '%s' does not contain a pseudonym.\n"),
         fileName);
@@ -522,7 +522,7 @@
   FREE(fileName);
   getPublicKey(hk,
               &pk);
-  freePrivateKey(hk);  
+  freePrivateKey(hk);
   hash(&pk, sizeof(PublicKey), &namespace);
   if (c->cb != NULL) {
     if (OK == c->cb(&namespace,

Modified: GNUnet/src/applications/fs/ecrs/search.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/search.c    2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/search.c    2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/fs/ecrs/search.c 
+ * @file applications/fs/ecrs/search.c
  * @brief Helper functions for searching.
  * @author Christian Grothoff
  */
@@ -67,7 +67,7 @@
 
   /**
    * The keys (for the search).
-   */ 
+   */
   HashCode512 * keys;
 
   /**
@@ -107,7 +107,7 @@
   PendingSearch ** queries;
 
   ECRS_SearchProgressCallback spcb;
-  
+
   void * spcbClosure;
 
   int aborted;
@@ -130,8 +130,8 @@
   ps->timeout = 0;
   ps->lastTransmission = 0;
   ps->priority = 5 + randomi(20);
-  ps->type = type; 
-  ps->keyCount = keyCount; 
+  ps->type = type;
+  ps->keyCount = keyCount;
   ps->keys = MALLOC(sizeof(HashCode512) * keyCount);
   memcpy(ps->keys,
         keys,
@@ -163,16 +163,16 @@
 
     hash(&uri->data.sks.identifier,
         sizeof(HashCode512),
-        &hk); 
+        &hk);
     xorHashCodes(&hk,
                 &uri->data.sks.namespace,
-                &keys[0]); /* compute routing key r = H(identifier) ^ 
namespace */   
+                &keys[0]); /* compute routing key r = H(identifier) ^ 
namespace */
     keys[1] = uri->data.sks.namespace;
     addPS(K_BLOCK,
          2,
          &keys[0],
          &uri->data.sks.identifier,
-         sqc);   
+         sqc);
     break;
   }
   case ksk: {
@@ -209,7 +209,7 @@
     LOG(LOG_ERROR,
        _("LOC URI not allowed for search.\n"));
     break;
-  default: 
+  default:
     BREAK();
     /* unknown URI type */
     break;
@@ -234,8 +234,8 @@
   unsigned int iter;
 
   if (ntohll(sb->updateInterval) == (cron_t) SBLOCK_UPDATE_SPORADIC) {
-    memcpy(c, 
-          &sb->nextIdentifier, 
+    memcpy(c,
+          &sb->nextIdentifier,
           sizeof(HashCode512));
     return OK;
   }
@@ -245,24 +245,24 @@
            &sb->nextIdentifier,
            c);
     return OK;
-  } 
+  }
   GNUNET_ASSERT(ntohll(sb->updateInterval) != 0);
   pos = ntohll(sb->creationTime);
   deltaId(&sb->identifierIncrement,
          &sb->nextIdentifier,
          c);
-  
+
   iter = (now - (pos + ntohll(sb->updateInterval))) / 
ntohll(sb->updateInterval);
-  if (iter > 0xFFFF) 
+  if (iter > 0xFFFF)
     /* too many iterators, signal error! */
     return SYSERR;
   while (pos + ntohll(sb->updateInterval) < now) {
     pos += ntohll(sb->updateInterval);
-    addHashCodes(c, 
+    addHashCodes(c,
                 &sb->identifierIncrement,
-                &tmp);    
+                &tmp);
     *c = tmp;
-  } 
+  }
   return OK;
 }
 
@@ -327,7 +327,7 @@
                        &query))
     return SYSERR;
   for (i=0;i<sqc->queryCount;i++) {
-    ps = sqc->queries[i];    
+    ps = sqc->queries[i];
     if ( equalsHashCode512(&query,
                           &ps->keys[0]) &&
         ( (ps->type == type) ||
@@ -383,7 +383,7 @@
          return SYSERR;
        }
        if (sqc->spcb != NULL) {
-         ret = sqc->spcb(&fi, 
+         ret = sqc->spcb(&fi,
                          &ps->decryptKey,
                          sqc->spcbClosure);
          if (ret == SYSERR)
@@ -393,7 +393,7 @@
        ECRS_freeUri(fi.uri);
        ECRS_freeMetaData(fi.meta);
        FREE(kb);
-       return ret;      
+       return ret;
       }
       case N_BLOCK: {
        const NBlock * nb;
@@ -440,7 +440,7 @@
                            &sb->creationTime,
                            size
                            - sizeof(Signature)
-                           - sizeof(PublicKey) 
+                           - sizeof(PublicKey)
                            - sizeof(HashCode512));
        j = sizeof(SBlock);
        while ( (j < size) &&
@@ -579,10 +579,10 @@
       ps->lastTransmission = now;
       LOG(LOG_DEBUG,
          "ECRS initiating FS search with timeout %llus and priority %u.\n",
-         (ps->timeout - now) / cronSECONDS, 
+         (ps->timeout - now) / cronSECONDS,
          ps->priority);
 
-      ps->handle 
+      ps->handle
        = FS_start_search(ctx.sctx,
                          ps->type,
                          ps->keyCount,

Modified: GNUnet/src/applications/fs/ecrs/searchtest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/searchtest.c        2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/ecrs/searchtest.c        2005-03-20 23:54:53 UTC 
(rev 464)
@@ -18,7 +18,7 @@
      Boston, MA 02111-1307, USA.
 */
 
-/** 
+/**
  * @file applications/fs/ecrs/searchtest.c
  * @brief testcase for search
  * @author Christian Grothoff
@@ -32,7 +32,7 @@
 
 #define CHECK(a) if (!(a)) { ok = NO; BREAK(); goto FAILURE; }
 
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   FREENONNULL(setConfigurationString("GNUNETD",
                                     "_MAGIC_",
@@ -84,7 +84,7 @@
              NULL);
   if (resultCount <= 0)
     return OK;
-  else 
+  else
     return SYSERR;
 }
 
@@ -119,7 +119,7 @@
   gnunet_util_sleep(5 * cronSECONDS); /* give gnunetd time to start */
   sock = getClientSocket();
   CHECK(sock != NULL);
-  
+
   /* ACTUAL TEST CODE */
   /* first, simple insertion => one result */
 #if 0
@@ -182,14 +182,14 @@
   if (daemon != -1) {
     if (0 != kill(daemon, SIGTERM))
       DIE_STRERROR("kill");
-    if (daemon != waitpid(daemon, &status, 0)) 
+    if (daemon != waitpid(daemon, &status, 0))
       DIE_STRERROR("waitpid");
-    
-    if ( (WEXITSTATUS(status) == 0) && 
+
+    if ( (WEXITSTATUS(status) == 0) &&
         (ok == YES) )
       return 0;
     else
-      return 1;    
+      return 1;
   } else {
     if (ok == YES)
       return 0;

Modified: GNUnet/src/applications/fs/ecrs/tree.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/tree.c      2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/tree.c      2005-03-20 23:54:53 UTC (rev 
464)
@@ -35,10 +35,10 @@
     treeDepth++;
     if (fl * CHK_PER_INODE < fl) {
       /* integer overflow, this is a HUGE file... */
-      return treeDepth; 
+      return treeDepth;
     }
     fl = fl * CHK_PER_INODE;
-  }  
+  }
   return treeDepth;
 }
 

Modified: GNUnet/src/applications/fs/ecrs/tree.h
===================================================================
--- GNUnet/src/applications/fs/ecrs/tree.h      2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/tree.h      2005-03-20 23:54:53 UTC (rev 
464)
@@ -25,7 +25,7 @@
 
 /**
  * Size of a DBlock.  Currently set for debugging.
- * Should be a multiple of 8 and larger than 
+ * Should be a multiple of 8 and larger than
  * sizeof(CHK). [ 32768? ]
  */
 #define DBLOCK_SIZE (sizeof(CHK) * 2 + 8)

Modified: GNUnet/src/applications/fs/ecrs/unindex.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/unindex.c   2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/unindex.c   2005-03-20 23:54:53 UTC (rev 
464)
@@ -63,7 +63,7 @@
   DBlock * db;
   CHK ichk;
 
-  size = ntohl(iblocks[level]->size) - sizeof(Datastore_Value); 
+  size = ntohl(iblocks[level]->size) - sizeof(Datastore_Value);
   present = (size - sizeof(DBlock)) / sizeof(CHK);
   db = (DBlock*) &iblocks[level][1];
   if (present == CHK_PER_INODE) {
@@ -73,9 +73,9 @@
     fileBlockGetQuery(db,
                      size,
                      &ichk.query);
-    if (OK != pushBlock(sock, 
+    if (OK != pushBlock(sock,
                        &ichk,
-                       level+1, 
+                       level+1,
                        iblocks)) {
       BREAK();
       return SYSERR;
@@ -94,7 +94,7 @@
 #else
     FS_delete(sock,
              value);
-#endif    
+#endif
     FREE(value);
     size = sizeof(DBlock);
   }
@@ -102,8 +102,8 @@
   memcpy(&((char*)db)[size],
         chk,
         sizeof(CHK));
-  iblocks[level]->size = htonl(size + 
-                              sizeof(CHK) + 
+  iblocks[level]->size = htonl(size +
+                              sizeof(CHK) +
                               sizeof(Datastore_Value));
   return OK;
 }
@@ -111,7 +111,7 @@
 
 
 /**
- * Undo sym-linking operation: 
+ * Undo sym-linking operation:
  * a) check if we have a symlink
  * b) delete symbolic link
  */
@@ -137,7 +137,7 @@
   if (! S_ISLNK(buf.st_mode))
     return OK;
 #endif
-  serverDir 
+  serverDir
     = getConfigurationOptionValue(sock,
                                  "FS",
                                  "INDEX-DIRECTORY");
@@ -153,7 +153,7 @@
   hash2enc(fileId,
           &enc);
   strcat(serverFN,
-        (char*)&enc);  
+        (char*)&enc);
 
   if (0 != UNLINK(serverFN)) {
     FREE(serverFN);
@@ -161,7 +161,7 @@
     LOG_FILE_STRERROR(LOG_ERROR, "unlink", tmpName);
     return SYSERR;
   }
-  
+
   FREE(tmpName);
   FREE(serverFN);
   return OK;
@@ -208,8 +208,8 @@
     return SYSERR;
   }
   sock = getClientSocket();
-  if (sock == NULL) 
-    return SYSERR;  
+  if (sock == NULL)
+    return SYSERR;
   filesize = getFileSize(filename);
   eta = 0;
   if (upcb != NULL)
@@ -221,20 +221,20 @@
     return SYSERR;
   }
   cronTime(&now);
-  eta = now + 2 * (now - start); 
+  eta = now + 2 * (now - start);
   /* very rough estimate: hash reads once through the file,
      we'll do that once more and write it.  But of course
      the second read may be cached, and we have the encryption,
      so a factor of two is really, really just a rough estimate */
   start = now;
   /* reset the counter since the formula later does not
-     take the time for getFileHash into account */  
+     take the time for getFileHash into account */
   treedepth = computeDepth(filesize);
 
   /* Test if file is indexed! */
   rti.header.size
     = htons(sizeof(RequestTestindex));
-  rti.header.type 
+  rti.header.type
     = htons(AFS_CS_PROTO_TESTINDEX);
   rti.fileId = fileId;
   if (OK != writeToSocket(sock,
@@ -283,24 +283,24 @@
     if (upcb != NULL)
       upcb(filesize, pos, eta, upcbClosure);
     if (tt != NULL)
-      if (OK != tt(ttClosure)) 
+      if (OK != tt(ttClosure))
        goto FAILURE;
     size = DBLOCK_SIZE;
     if (size > filesize - pos) {
       size = filesize - pos;
       memset(&db[1],
-            0, 
+            0,
             DBLOCK_SIZE);
     }
     dblock->size = htonl(sizeof(Datastore_Value) + size + sizeof(DBlock));
-    if (size != READ(fd, 
-                    &db[1], 
+    if (size != READ(fd,
+                    &db[1],
                     size)) {
       LOG_FILE_STRERROR(LOG_WARNING,
-                       "READ", 
+                       "READ",
                        filename);
       goto FAILURE;
-    }   
+    }
     if (tt != NULL)
       if (OK != tt(ttClosure))
        goto FAILURE;
@@ -333,18 +333,18 @@
 #else
       FS_delete(sock,
                value);
-#endif     
+#endif
       FREE(value);
     }
     pos += size;
     cronTime(&now);
     eta = (cron_t) (start +
-                   (((double)(now - start)/(double)pos)) 
+                   (((double)(now - start)/(double)pos))
                    * (double)filesize);
   }
   if (tt != NULL)
     if (OK != tt(ttClosure))
-      goto FAILURE;  
+      goto FAILURE;
   for (i=0;i<treedepth;i++) {
     size = ntohl(iblocks[i]->size) - sizeof(Datastore_Value);
     db = (DBlock*) &iblocks[i][1];
@@ -353,10 +353,10 @@
                    &chk.key);
     fileBlockGetQuery(db,
                      size,
-                     &chk.query);   
-    if (OK != pushBlock(sock, 
+                     &chk.query);
+    if (OK != pushBlock(sock,
                        &chk,
-                       i+1, 
+                       i+1,
                        iblocks)) {
       BREAK();
       goto FAILURE;
@@ -375,12 +375,12 @@
 #else
     FS_delete(sock,
              value);
-#endif    
+#endif
     FREE(value);
     FREE(iblocks[i]);
     iblocks[i] = NULL;
   }
-  
+
   if (wasIndexed) {
     if (OK == undoSymlinking(filename,
                             &fileId,

Modified: GNUnet/src/applications/fs/ecrs/upload.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/upload.c    2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/upload.c    2005-03-20 23:54:53 UTC (rev 
464)
@@ -103,8 +103,8 @@
   memcpy(&((char*)db)[size],
         chk,
         sizeof(CHK));
-  iblocks[level]->size = htonl(size + 
-                              sizeof(CHK) + 
+  iblocks[level]->size = htonl(size +
+                              sizeof(CHK) +
                               sizeof(Datastore_Value));
   return OK;
 }
@@ -147,7 +147,7 @@
   cron_t start;
   cron_t now;
   char * uris;
-  FileIdentifier fid; 
+  FileIdentifier fid;
   EncName enc;
 
   cronTime(&start);
@@ -161,8 +161,8 @@
     return SYSERR;
   }
   sock = getClientSocket();
-  if (sock == NULL) 
-    return SYSERR;  
+  if (sock == NULL)
+    return SYSERR;
   filesize = getFileSize(filename);
   eta = 0;
   if (upcb != NULL)
@@ -174,7 +174,7 @@
       return SYSERR;
     }
     cronTime(&now);
-    eta = now + 2 * (now - start); 
+    eta = now + 2 * (now - start);
     /* very rough estimate: hash reads once through the file,
        we'll do that once more and write it.  But of course
        the second read may be cached, and we have the encryption,
@@ -216,7 +216,7 @@
     iblocks[i]->expirationTime = htonll(expirationTime);
     ((DBlock*) &iblocks[i][1])->type = htonl(D_BLOCK);
   }
-  
+
   pos = 0;
   while (pos < filesize) {
     if (upcb != NULL)
@@ -227,19 +227,19 @@
     size = DBLOCK_SIZE;
     if (size > filesize - pos) {
       size = filesize - pos;
-      memset(&db[1], 
-            0, 
+      memset(&db[1],
+            0,
             DBLOCK_SIZE);
     }
     dblock->size = htonl(sizeof(Datastore_Value) + size + sizeof(DBlock));
-    if (size != READ(fd, 
-                    &db[1], 
+    if (size != READ(fd,
+                    &db[1],
                     size)) {
-      LOG_FILE_STRERROR(LOG_WARNING, 
+      LOG_FILE_STRERROR(LOG_WARNING,
                        "READ",
                        filename);
       goto FAILURE;
-    }   
+    }
     if (tt != NULL)
       if (OK != tt(ttClosure))
        goto FAILURE;
@@ -279,7 +279,7 @@
     cronTime(&now);
     if (pos > 0) {
       eta = (cron_t) (start +
-                     (((double)(now - start)/(double)pos)) 
+                     (((double)(now - start)/(double)pos))
                      * (double)filesize);
     }
     if (OK != pushBlock(sock,
@@ -290,7 +290,7 @@
   }
   if (tt != NULL)
     if (OK != tt(ttClosure))
-      goto FAILURE;  
+      goto FAILURE;
   LOG(LOG_DEBUG,
       "Tree depth is %u, walking up tree.\n",
       treedepth);
@@ -311,7 +311,7 @@
        size);
     fileBlockGetQuery(db,
                      size,
-                     &chk.query);   
+                     &chk.query);
     IFLOG(LOG_DEBUG,
          hash2enc(&chk.query,
                   &enc));
@@ -319,9 +319,9 @@
        "Query for current block at level %u is %s\n",
        i,
        &enc);
-    if (OK != pushBlock(sock, 
+    if (OK != pushBlock(sock,
                        &chk,
-                       i+1, 
+                       i+1,
                        iblocks))
       goto FAILURE;
     fileBlockEncode(db,
@@ -346,7 +346,7 @@
                 &enc));
   LOG(LOG_DEBUG,
       "Query for top block is %s\n",
-      &enc);  
+      &enc);
   /* build URI */
   fid.file_length = htonll(filesize);
   db = (DBlock*) &iblocks[treedepth][1];

Modified: GNUnet/src/applications/fs/ecrs/uri.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/uri.c       2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/uri.c       2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/fs/ecrs/uri.c 
+ * @file applications/fs/ecrs/uri.c
  * @brief Parses and produces uri strings.
  * @author Igor Wronsky, Christian Grothoff
  *
@@ -37,7 +37,7 @@
  * implementation is rather different in pretty much every detail.
  * The concrete URI formats are:
  *
- * <ul><li> 
+ * <ul><li>
  *
  * First, there are URIs that identify a file.  They have the format
  * "gnunet://ecrs/chk/HEX1.HEX2.SIZE".  These URIs can be used to
@@ -45,7 +45,7 @@
  * meta-data is NOT part of the file-URI since a URI uniquely
  * identifies a resource (and the contents of the file would be the
  * same even if it had a different description).
- * 
+ *
  * </li><li>
  *
  * The second category identifies entries in a namespace.  The format
@@ -56,16 +56,16 @@
  * identifier is in ASCII but the format is ambiguous and could denote
  * a HEX-string a "/" is appended to indicate ASCII encoding.
  *
- * </li> <li> 
+ * </li> <li>
  *
  * The third category identifies ordinary searches.  The format is
  * "gnunet://ecrs/ksk/KEYWORD[+KEYWORD]*".  Using the "+" syntax
  * it is possible to encode searches with the boolean "AND" operator.
  * "+" is used since it indicates a commutative 'and' operation and
- * is unlikely to be used in a keyword by itself.  
+ * is unlikely to be used in a keyword by itself.
  *
- * </li><li> 
- * 
+ * </li><li>
+ *
  * The last category identifies a datum on a specific machine.  The
  * format is "gnunet://ecrs/loc/PEER/QUERY.TYPE.KEY.SIZE".  MACHINE is
  * the EncName of the peer storing the datum, TYPE is the (block) type
@@ -113,7 +113,7 @@
 
 /**
  * Generate a subspace URI.
- */ 
+ */
 static char * createSubspaceURI(const HashCode512 * namespace,
                                const HashCode512 * identifier) {
   size_t n;
@@ -124,7 +124,7 @@
   n = sizeof(EncName) * 2 + strlen(ECRS_URI_PREFIX) + 
strlen(ECRS_SUBSPACE_INFIX) + 1;
   ret = MALLOC(n);
   hash2enc(namespace, &ns);
-  hash2enc(identifier, &id);  
+  hash2enc(identifier, &id);
   SNPRINTF(ret, n,
           "%s%s%s/%s",
           ECRS_URI_PREFIX,
@@ -136,28 +136,28 @@
 
 /**
  * Generate a file URI.
- */ 
+ */
 char * createFileURI(const FileIdentifier * fi) {
   char * ret;
   EncName keyhash;
-  EncName queryhash;  
+  EncName queryhash;
   size_t n;
-    
+
   hash2enc(&fi->chk.key,
            &keyhash);
   hash2enc(&fi->chk.query,
            &queryhash);
-  
+
   n = 
strlen(ECRS_URI_PREFIX)+2*sizeof(EncName)+8+16+32+strlen(ECRS_FILE_INFIX);
   ret = MALLOC(n);
-  SNPRINTF(ret, 
+  SNPRINTF(ret,
           n,
           "%s%s%s.%s.%llu",
           ECRS_URI_PREFIX,
           ECRS_FILE_INFIX,
           (char*)&keyhash,
           (char*)&queryhash,
-          ntohll(fi->file_length));         
+          ntohll(fi->file_length));    
   return ret;
 }
 
@@ -186,7 +186,7 @@
   }
 }
 
-/** 
+/**
  * Parses an AFS search URI.
  *
  * @param uri an uri string
@@ -202,15 +202,15 @@
   int i;
   size_t slen;
   char * dup;
-  
+
   GNUNET_ASSERT(uri != NULL);
-  
+
   slen = strlen(uri);
   pos = strlen(ECRS_URI_PREFIX);
- 
-  if (0 != strncmp(uri, 
+
+  if (0 != strncmp(uri,
                   ECRS_URI_PREFIX,
-                  pos)) 
+                  pos))
     return SYSERR;
   if (0 != strncmp(&uri[pos],
                   ECRS_SEARCH_INFIX,
@@ -218,10 +218,10 @@
     return SYSERR;
   pos += strlen(ECRS_SEARCH_INFIX);
   if ( (slen == pos) ||
-       (uri[slen-1] == '+') || 
+       (uri[slen-1] == '+') ||
        (uri[pos] == '+') )
     return SYSERR; /* no keywords / malformed */
-  
+
   ret = 1;
   for (i=pos;i<slen;i++) {
     if (uri[i] == '+') {
@@ -238,13 +238,13 @@
       (*keywords)[--ret] = STRDUP(&dup[i+1]);
       dup[i] = '\0';
     }
-  }  
+  }
   (*keywords)[--ret] = STRDUP(&dup[pos]);
   FREE(dup);
   return iret;
 }
 
-/** 
+/**
  * Parses an AFS namespace / subspace identifier URI.
  *
  * @param uri an uri string
@@ -258,15 +258,15 @@
   unsigned int pos;
   size_t slen;
   char * up;
-  
+
   GNUNET_ASSERT(uri != NULL);
-  
+
   slen = strlen(uri);
   pos = strlen(ECRS_URI_PREFIX);
- 
-  if (0 != strncmp(uri, 
+
+  if (0 != strncmp(uri,
                   ECRS_URI_PREFIX,
-                  pos)) 
+                  pos))
     return SYSERR;
   if (0 != strncmp(&uri[pos],
                   ECRS_SUBSPACE_INFIX,
@@ -283,7 +283,7 @@
                       namespace)) ) {
     FREE(up);
     return SYSERR;
-  }    
+  }
   if ( (slen != pos+2*sizeof(EncName)-1) ||
        (OK == enc2hash(&up[pos+sizeof(EncName)],
                       identifier)) ) {
@@ -297,7 +297,7 @@
   return OK;
 }
 
-/** 
+/**
  * Parses an URI that identifies a file
  *
  * @param uri an uri string
@@ -309,15 +309,15 @@
   unsigned int pos;
   size_t slen;
   char * dup;
-  
+
   GNUNET_ASSERT(uri != NULL);
-  
+
   slen = strlen(uri);
   pos = strlen(ECRS_URI_PREFIX);
- 
-  if (0 != strncmp(uri, 
+
+  if (0 != strncmp(uri,
                   ECRS_URI_PREFIX,
-                  pos)) 
+                  pos))
     return SYSERR;
   if (0 != strncmp(&uri[pos],
                   ECRS_FILE_INFIX,
@@ -326,7 +326,7 @@
   pos += strlen(ECRS_FILE_INFIX);
   if ( (slen < pos+2*sizeof(EncName)+1) ||
        (uri[pos+sizeof(EncName)-1] != '.') ||
-       (uri[pos+sizeof(EncName)*2-1] != '.') ) 
+       (uri[pos+sizeof(EncName)*2-1] != '.') )
     return SYSERR;
 
   dup = STRDUP(uri);
@@ -340,7 +340,7 @@
                    "%llu",
                    &fi->file_length)) ) {
     FREE(dup);
-    return SYSERR;  
+    return SYSERR;
   }
   FREE(dup);
   fi->file_length = htonll(fi->file_length);
@@ -374,7 +374,7 @@
     return NULL;
   }
   ret->type = ksk;
-  ret->data.ksk.keywordCount 
+  ret->data.ksk.keywordCount
     = len;
   return ret;
 }
@@ -392,7 +392,7 @@
         uri->data.ksk.keywordCount,
         0);
   }
-   
+
   FREE(uri);
 }
 
@@ -411,7 +411,7 @@
  */
 char * ECRS_getNamespaceName(const HashCode512 * id) {
   char * ret;
-  
+
   ret = MALLOC(sizeof(EncName));
   hash2enc(id,
           (EncName*)ret);
@@ -429,7 +429,7 @@
   if (! ECRS_isNamespaceURI(uri)) {
     BREAK();
     return SYSERR;
-  }  
+  }
   *id = uri->data.sks.namespace;
   return OK;
 }
@@ -518,7 +518,7 @@
   unsigned int count;
   URI * ret;
   unsigned int i;
-  
+
   count = 0;
   while (keyword[count] != NULL)
     count++;
@@ -533,7 +533,7 @@
   for (i=0;i<count;i++)
     ret->data.ksk.keywords[i] = STRDUP(keyword[i]);
   return ret;
-  
+
 }
 
 

Modified: GNUnet/src/applications/fs/ecrs/uri.h
===================================================================
--- GNUnet/src/applications/fs/ecrs/uri.h       2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/uri.h       2005-03-20 23:54:53 UTC (rev 
464)
@@ -25,7 +25,7 @@
 
 /**
  * Generate a file URI.
- */ 
+ */
 char * createFileURI(const FileIdentifier * fi);
 
 #endif

Modified: GNUnet/src/applications/fs/ecrs/uritest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/uritest.c   2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs/uritest.c   2005-03-20 23:54:53 UTC (rev 
464)
@@ -49,7 +49,7 @@
 
   uri = ECRS_uriToString(ret);
   if (0 != strcmp(uri,
-                 "gnunet://ecrs/ksk/foo+bar")) 
+                 "gnunet://ecrs/ksk/foo+bar"))
     ABORT();
   FREE(uri);
   ECRS_freeUri(ret);
@@ -59,7 +59,7 @@
 static int testNamespace(int i) {
   char * uri;
   struct ECRS_URI * ret;
-  
+
   if (NULL != 
ECRS_stringToUri("gnunet://ecrs/sks/D1KJS9H2A82Q65VKQ0ML3RFU6U1D3VUK"))
     ABORT();
   if (NULL != 
ECRS_stringToUri("gnunet://ecrs/sks/D1KJS9H2A82Q65VKQ0ML3RFU6U1D3V/test"))
@@ -76,8 +76,8 @@
 
   uri = ECRS_uriToString(ret);
   if (0 != strcmp(uri,
-                 
"gnunet://ecrs/sks/C282GG70GKK41O4551011DO413KFBVTVMQG1OG30I0K4045N0G41HAPB82G680A02JRVVFO8URVRU2F159011DO41000000022RG820/TOJB1NAAUVJKJAGQHRHS22N9I8VM32C0ESN4EFS836IT950E1MP7LGC5V2GE3LFO9U4BP23VQPTH8DPIOC2CONT9LM76ULVL00KAHVO"))
 
-    ABORT();  
+                 
"gnunet://ecrs/sks/C282GG70GKK41O4551011DO413KFBVTVMQG1OG30I0K4045N0G41HAPB82G680A02JRVVFO8URVRU2F159011DO41000000022RG820/TOJB1NAAUVJKJAGQHRHS22N9I8VM32C0ESN4EFS836IT950E1MP7LGC5V2GE3LFO9U4BP23VQPTH8DPIOC2CONT9LM76ULVL00KAHVO"))
+    ABORT();
   FREE(uri);
   ECRS_freeUri(ret);
   return 0;
@@ -86,7 +86,7 @@
 static int testFile(int i) {
   char * uri;
   struct ECRS_URI * ret;
-  
+
   if (NULL != 
ECRS_stringToUri("gnunet://ecrs/chk/C282GG70GKK41O4551011DO413KFBVTVMQG1OG30I0K4045N0G41HAPB82G680A02JRVVFO8URVRU2F159011DO41000000022RG820.RNVVVVOOLCLK065B5D04HTNVNSIB2AI022RG8200HSLK1CO1000ATQ98824DMA2032LIMG50CG0K057NVUVG200000H00000440000.42"))
     ABORT();
   if (NULL != 
ECRS_stringToUri("gnunet://ecrs/chk/C282GG70GKK41O4551011DO413KFBVTVMQG1OG30I0K4045N0G41HAPB82G680A02JRVVFO8URVRU2F159011DO41000000022RG820.RNVVVVOOLCLK065B5D04HTNVNSIB2AI022RG8200HSLK1CO1000ATQ98824DMA2032LIMG50CG0K057NVUVG200000H000004400000"))
@@ -106,14 +106,14 @@
   uri = ECRS_uriToString(ret);
   if (0 != strcmp(uri,
                  
"gnunet://ecrs/chk/C282GG70GKK41O4551011DO413KFBVTVMQG1OG30I0K4045N0G41HAPB82G680A02JRVVFO8URVRU2F159011DO41000000022RG820.RNVVVVOOLCLK065B5D04HTNVNSIB2AI022RG8200HSLK1CO1000ATQ98824DMA2032LIMG50CG0K057NVUVG200000H000004400000.42"))
 {
-    ABORT();  
+    ABORT();
   }
   FREE(uri);
   ECRS_freeUri(ret);
   return 0;
 }
 
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   FREENONNULL(setConfigurationString("GNUNETD",
                                     "_MAGIC_",
@@ -140,8 +140,8 @@
   doneUtil();
   if (failureCount == 0)
     return 0;
-  else 
+  else
     return 1;
-} 
+}
 
 /* end of uritest.c */

Modified: GNUnet/src/applications/fs/ecrs_core.c
===================================================================
--- GNUnet/src/applications/fs/ecrs_core.c      2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/ecrs_core.c      2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 
 /**
  * @file applications/fs/module/ecrs_core.c
- * @brief support for ECRS encoding of files 
+ * @brief support for ECRS encoding of files
  * @author Christian Grothoff
  */
 
@@ -28,7 +28,7 @@
 #include "ecrs_core.h"
 
 /**
- * Perform on-demand content encoding.  
+ * Perform on-demand content encoding.
  *
  * @param data the data to encode
  * @param len the length of the data
@@ -96,7 +96,7 @@
                     HashCode512 * key) {
   GNUNET_ASSERT(len >= sizeof(DBlock));
   hash(&data[1],
-       len - sizeof(DBlock), 
+       len - sizeof(DBlock),
        key);
 }
 
@@ -120,7 +120,7 @@
   hashToKey(&hc,
            &skey,
            &iv);
-  tmp = MALLOC(len);  
+  tmp = MALLOC(len);
   GNUNET_ASSERT(len == encryptBlock(data,
                                    len,
                                    &skey,
@@ -150,18 +150,18 @@
  */
 int getQueryFor(unsigned int size,
                const DBlock * data,
-               HashCode512 * query) {  
+               HashCode512 * query) {
   unsigned int type;
 
   type = getTypeOfBlock(size, data);
   if (type == ANY_BLOCK)
     return SYSERR;
   switch (type) {
-  case D_BLOCK: 
+  case D_BLOCK:
     fileBlockGetKey(data,
-                   size, 
+                   size,
                    query);
-    return OK;  
+    return OK;
   case S_BLOCK: {
     const SBlock * sb;
     if (size < sizeof(SBlock)) {
@@ -237,15 +237,15 @@
   case ONDEMAND_BLOCK: {
     BREAK(); /* should never be used here! */
     return SYSERR;
-  }    
+  }
   default: {
     BREAK(); /* unknown block type */
     return SYSERR;
   }
   } /* end switch */
 }
-  
-  
+
+
 /**
  * Verify that the given Datum is a valid response
  * to a given query.
@@ -267,7 +267,7 @@
                      const HashCode512 * keys) {
   HashCode512 hc;
 
-  if (type != getTypeOfBlock(size, data)) {    
+  if (type != getTypeOfBlock(size, data)) {
     BREAK();
     return SYSERR; /* type mismatch */
   }
@@ -278,39 +278,39 @@
   if (! equalsHashCode512(&hc, &keys[0])) {
     BREAK(); /* mismatch between primary queries,
                we should not even see those here. */
-    return SYSERR;    
+    return SYSERR;
   }
   if (keyCount == 0)
     return YES; /* request was to match only primary key */
   switch (type) {
-  case S_BLOCK: 
-    if (keyCount != 2) 
+  case S_BLOCK:
+    if (keyCount != 2)
       return SYSERR; /* no match */
     hash(&((const SBlock*)data)->subspace,
         sizeof(PublicKey),
-        &hc);   
+        &hc);  
     if (equalsHashCode512(&keys[1],
                          &hc))
       return OK;
     else
-      return SYSERR;  
-  case N_BLOCK: 
-    if (keyCount != 2) 
+      return SYSERR;
+  case N_BLOCK:
+    if (keyCount != 2)
       return SYSERR; /* no match */
     hash(&((const NBlock*)data)->subspace,
         sizeof(PublicKey),
-        &hc);   
+        &hc);  
     if (equalsHashCode512(&keys[1],
                          &hc))
       return OK;
     else
-      return SYSERR;  
+      return SYSERR;
   case D_BLOCK:
   case K_BLOCK:
-  case KN_BLOCK: 
+  case KN_BLOCK:
     if (keyCount != 1)
       BREAK(); /* keyCount should be 1 */
-    return OK; /* if query matches, everything matches! */    
+    return OK; /* if query matches, everything matches! */
   case ANY_BLOCK:
     BREAK(); /* block type should be known */
     return SYSERR;

Modified: GNUnet/src/applications/fs/fsui/collection.c
===================================================================
--- GNUnet/src/applications/fs/fsui/collection.c        2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/fsui/collection.c        2005-03-20 23:54:53 UTC 
(rev 464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/fs/fsui/collection.c 
+ * @file applications/fs/fsui/collection.c
  * @brief Helper functions for building a collection
  * @author Christian Grothoff
  *
@@ -42,7 +42,7 @@
 /**
  * Entry in the state-DB that caches the current
  * collection.
- */ 
+ */
 #define COLLECTION "collection"
 
 /**
@@ -173,7 +173,7 @@
   cd = (CollectionData*) ctx->collectionData;
   ECRS_deleteNamespace(cd->name);
   FREE(cd);
-  ctx->collectionData = NULL;  
+  ctx->collectionData = NULL;
   return OK;
 }
 
@@ -198,7 +198,7 @@
  * collecting, this function does nothing.
  *
  * Note that clients typically don't have to call this
- * function explicitly.  FSUI will call the function on 
+ * function explicitly.  FSUI will call the function on
  * exit (for sporadically updated collections), on any
  * change to the collection (for immediately updated
  * content) or when the publication time has arrived
@@ -210,7 +210,7 @@
  */
 void FSUI_publishCollectionNow(struct FSUI_Context * ctx) {
   CollectionData * cd;
-  cron_t now;  
+  cron_t now;
   struct ECRS_URI * uri;
   struct ECRS_URI * directoryURI;
   struct ECRS_MetaData *  metaData;
@@ -228,7 +228,7 @@
   if ( (ntohll(cd->updateInterval) != ECRS_SBLOCK_UPDATE_NONE) &&
        (ntohll(cd->updateInterval) != ECRS_SBLOCK_UPDATE_SPORADIC) &&
        (ntohll(cd->lastPublication) + ntohll(cd->updateInterval) < now) )
-    return;  
+    return;
   if ( (ntohll(cd->updateInterval) != ECRS_SBLOCK_UPDATE_NONE) &&
        (ntohll(cd->updateInterval) != ECRS_SBLOCK_UPDATE_SPORADIC) ) {
     HashCode512 delta;
@@ -280,7 +280,7 @@
                                         dirLen,
                                         &metaData,
                                         NULL,
-                                        NULL));  
+                                        NULL));
   if (OK == ECRS_addToNamespace(cd->name,
                                ntohl(cd->anonymityLevel),
                                getConfigurationInt("FS",

Modified: GNUnet/src/applications/fs/fsui/download.c
===================================================================
--- GNUnet/src/applications/fs/fsui/download.c  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/fsui/download.c  2005-03-20 23:54:53 UTC (rev 
464)
@@ -38,7 +38,7 @@
  *  if the disk does not have enough space).
  */
 static int startDownload(struct FSUI_Context * ctx,
-                        unsigned int anonymityLevel,                    
+                        unsigned int anonymityLevel,                   
                         const struct ECRS_URI * uri,
                         const char * filename,
                         int is_recursive,
@@ -72,8 +72,8 @@
     filename = STRDUP(&tmp[strlen(ECRS_URI_PREFIX) + strlen(ECRS_FILE_INFIX)]);
     FREE(tmp);
   }
-  fullName = MALLOC(strlen(parent->filename) + 
-                   + strlen(GNUNET_DIRECTORY_EXT) + 2 
+  fullName = MALLOC(strlen(parent->filename) +
+                   + strlen(GNUNET_DIRECTORY_EXT) + 2
                    + strlen(filename));
   strcpy(fullName, parent->filename);
   strcat(fullName, GNUNET_DIRECTORY_EXT);
@@ -105,7 +105,7 @@
   FSUI_Event event;
   struct ECRS_MetaData * md;
   FSUI_DownloadList * root;
-  
+
   root = dl;
   while (root->parent != NULL)
     root = root->parent;
@@ -132,7 +132,7 @@
     if ( (lastBlockSize > strlen(GNUNET_DIRECTORY_MAGIC)) &&
         (0 == strncmp(GNUNET_DIRECTORY_MAGIC,
                       lastBlock,
-                      strlen(GNUNET_DIRECTORY_MAGIC)) ) ) 
+                      strlen(GNUNET_DIRECTORY_MAGIC)) ) )
       dl->is_directory = YES;
     else
       dl->is_directory = NO;
@@ -174,11 +174,11 @@
   FSUI_DownloadList * pos;
   struct ECRS_MetaData * md;
   FSUI_DownloadList * root;
-  
+
   root = dl;
   while (root->parent != NULL)
     root = root->parent;
-  
+
   totalBytes = ECRS_fileSize(dl->uri);
   ret = ECRS_downloadFile(dl->uri,
                          dl->filename,
@@ -218,15 +218,15 @@
              O_LARGEFILE | O_RDONLY);
 #else
     fd = OPEN(dl->filename,
-             O_RDONLY);     
+             O_RDONLY);
 #endif
     if (fd == -1) {
       LOG_FILE_STRERROR(LOG_ERROR,
                        "OPEN",
                        dl->filename);
     } else {
-      dirBlock = MMAP(NULL, 
-                     totalBytes, 
+      dirBlock = MMAP(NULL,
+                     totalBytes,
                      PROT_READ,
                      MAP_SHARED,
                      fd,
@@ -248,7 +248,7 @@
     /* wait for recursive downloads (if any) */
     while ( (dl->subDownloads != NULL) &&
            (dl->signalTerminate != YES) )
-      gnunet_util_sleep(100);    
+      gnunet_util_sleep(100);
   }
   if (dl->parent != NULL) {
     /* notify parent that we're done */
@@ -271,11 +271,11 @@
       if (prev != NULL)
        prev->next = pos->subDownloadsNext;
       else
-       dl->parent->subDownloads = pos->subDownloadsNext;      
-    }    
+       dl->parent->subDownloads = pos->subDownloadsNext;
+    }
     MUTEX_UNLOCK(&dl->ctx->lock);
   }
-  dl->signalTerminate = YES; 
+  dl->signalTerminate = YES;
   return NULL;
 }
 
@@ -287,7 +287,7 @@
  *  if the disk does not have enough space).
  */
 static int startDownload(struct FSUI_Context * ctx,
-                        unsigned int anonymityLevel, 
+                        unsigned int anonymityLevel,
                         const struct ECRS_URI * uri,
                         const char * filename,
                         int is_recursive,
@@ -297,7 +297,7 @@
   if (! (ECRS_isFileURI(uri) ||
         ECRS_isLocationURI(uri)) ) {
     BREAK(); /* wrong type of URI! */
-    return SYSERR; 
+    return SYSERR;
   }
 
   dl = MALLOC(sizeof(FSUI_DownloadList));
@@ -311,7 +311,7 @@
   dl->ctx = ctx;
   dl->filename = STRDUP(filename);
   dl->uri = ECRS_dupUri(uri);
-  dl->total = ECRS_fileSize(uri); 
+  dl->total = ECRS_fileSize(uri);
   MUTEX_LOCK(&ctx->lock);
   if (0 != PTHREAD_CREATE(&dl->handle,
                          (PThreadMain) &downloadThread,
@@ -343,14 +343,14 @@
  *  if the disk does not have enough space).
  */
 int FSUI_startDownload(struct FSUI_Context * ctx,
-                      unsigned int anonymityLevel,                      
+                      unsigned int anonymityLevel,                     
                       const struct ECRS_URI * uri,
                       const char * filename) {
   return startDownload(ctx,
-                      anonymityLevel, 
-                      uri, 
+                      anonymityLevel,
+                      uri,
                       filename,
-                      NO, 
+                      NO,
                       NULL);
 }
 
@@ -368,7 +368,7 @@
   dl = ctx->activeDownloads;
   while (dl != NULL) {
     if (ECRS_equalsUri(uri,
-                      dl->uri)) {      
+                      dl->uri)) {
       dl->signalTerminate = YES;
       MUTEX_UNLOCK(&ctx->lock);
       cleanupFSUIThreadList(ctx);
@@ -393,7 +393,7 @@
   int ret;
 
   ret = 0;
-  cleanupFSUIThreadList(ctx);      
+  cleanupFSUIThreadList(ctx);
   MUTEX_LOCK(&ctx->lock);
   dl = ctx->activeDownloads;
   while (dl != NULL) {
@@ -421,20 +421,20 @@
  *  SYSERR if the file does not exist
  */
 int FSUI_startDownloadAll(struct FSUI_Context * ctx,
-                         unsigned int anonymityLevel,                   
+                         unsigned int anonymityLevel,                  
                          const struct ECRS_URI * uri,
                          const char * dirname) {
-  return startDownload(ctx, 
+  return startDownload(ctx,
                       anonymityLevel,
-                      uri, 
-                      dirname, 
+                      uri,
+                      dirname,
                       YES,
                       NULL);
 }
 
 /**
  * Abort a recursive download (internal function).
- * 
+ *
  * Do NOT call cleanupFSUIThreadList in here -- this
  * function maybe called recursively!
  *
@@ -452,12 +452,12 @@
     if ( (0 == strcmp(dirname,
                      dl->filename)) &&
         (ECRS_equalsUri(uri,
-                        dl->uri)) ) {      
+                        dl->uri)) ) {
       dl->signalTerminate = YES;
       for (i=0;i<dl->completedDownloadsCount;i++)
        FSUI_stopDownloadAll(ctx,
                             dl->completedDownloads[i],
-                            dirname);      
+                            dirname);
       return OK;
     }
     dl = dl->next;
@@ -467,7 +467,7 @@
 
 /**
  * Abort a recursive download.
- * 
+ *
  * @return OK on success, SYSERR if no such download is
  *  pending
  */
@@ -478,7 +478,7 @@
 
   MUTEX_LOCK(&ctx->lock);
   ret = stopDownloadAll(ctx, uri, dirname);
-  MUTEX_UNLOCK(&ctx->lock);  
+  MUTEX_UNLOCK(&ctx->lock);
   cleanupFSUIThreadList(ctx);
   return ret;
 }

Modified: GNUnet/src/applications/fs/fsui/file_info.c
===================================================================
--- GNUnet/src/applications/fs/fsui/file_info.c 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/fsui/file_info.c 2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/fs/fsui/file_info.c 
+ * @file applications/fs/fsui/file_info.c
  * @brief Helper functions for keeping track of files for building directories.
  * @author Christian Grothoff
  *
@@ -52,7 +52,7 @@
   FREE(tmpname);
   sem = IPC_SEMAPHORE_NEW(ipcName, 1);
   FREE(ipcName);
-  return sem;                              
+  return sem;                          
 }
 
 
@@ -60,7 +60,7 @@
  * Get the FSUI URI tracking status.
  *
  * @return YES of tracking is enabled, NO if not
- */ 
+ */
 int FSUI_trackStatus() {
   int * status;
 
@@ -97,8 +97,8 @@
                                               NO));
   size = htonl(size);
   suri = ECRS_uriToString(fi->uri);
-  sem = createIPC();  
-  IPC_SEMAPHORE_DOWN(sem); 
+  sem = createIPC();
+  IPC_SEMAPHORE_DOWN(sem);
   stateAppendContent(STATE_NAME, strlen(suri) + 1, suri);
   stateAppendContent(STATE_NAME, sizeof(unsigned int), &size);
   stateAppendContent(STATE_NAME, ntohl(size), data);
@@ -110,7 +110,7 @@
 /**
  * Remove all of the root-nodes of a particular type
  * from the tracking database.
- */ 
+ */
 static void emptyTrackDatabase() {
   IPC_Semaphore * sem;
 
@@ -127,7 +127,7 @@
  * @param onOff YES to enable tracking, NO to disable
  *  disabling tracking also deletes all entries in the
  *  cache.
- */ 
+ */
 void FSUI_trackURIS(int onOff) {
   if (onOff == NO)
     emptyTrackDatabase();
@@ -167,11 +167,11 @@
     while ( (spos < ret) &&
            (result[spos] != '\0') )
       spos++;
-    if (spos + sizeof(int) >= ret) 
+    if (spos + sizeof(int) >= ret)
       goto FORMATERROR;
     fi.uri = ECRS_stringToUri(&result[pos]);
     if (fi.uri == NULL)
-      goto FORMATERROR;    
+      goto FORMATERROR;
     memcpy(&msize, &result[spos], sizeof(int));
     msize = ntohl(msize);
     spos += 4;

Modified: GNUnet/src/applications/fs/fsui/fsui.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui.c      2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/fsui/fsui.c      2005-03-20 23:54:53 UTC (rev 
464)
@@ -39,7 +39,7 @@
                                 int doResume,
                                 FSUI_EventCallback cb,
                                 void * closure) {
-  FSUI_Context * ret;  
+  FSUI_Context * ret;
   char * fn;
   char * gh;
 
@@ -88,7 +88,7 @@
     ECRS_freeUri(dpos->uri);
     FREE(dpos->filename);
     for (i=dpos->completedDownloadsCount-1;i>=0;i--)
-      ECRS_freeUri(dpos->completedDownloads[i]);    
+      ECRS_freeUri(dpos->completedDownloads[i]);
     GROW(dpos->completedDownloads,
         dpos->completedDownloadsCount,
         0);
@@ -115,7 +115,7 @@
     PTHREAD_JOIN(&tpos->handle, &unused);
     FREE(tpos);
   }
-  
+
   while (ctx->activeSearches != NULL) {
     spos = ctx->activeSearches;
     ctx->activeSearches = spos->next;
@@ -174,7 +174,7 @@
   FSUI_DownloadList * dtmp;
   void * unused;
   int i;
-  
+
   prev = NULL;
   MUTEX_LOCK(&ctx->lock);
   pos = ctx->activeThreads;
@@ -208,7 +208,7 @@
        ECRS_freeUri(dpos->completedDownloads[i]);
       GROW(dpos->completedDownloads,
           dpos->completedDownloadsCount,
-          0);      
+          0);
       FREE(dpos);
       if (dprev != NULL)
        dprev->next = dtmp;

Modified: GNUnet/src/applications/fs/fsui/fsui.h
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui.h      2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/fsui/fsui.h      2005-03-20 23:54:53 UTC (rev 
464)
@@ -112,7 +112,7 @@
    * yet all of them.
    */
   unsigned int sizeUnmatchedResultsReceived;
-  
+
   ResultPending * unmatchedResultsReceived;
 
 } FSUI_SearchList;
@@ -148,7 +148,7 @@
   /**
    * FSUI context for this download.
    */
-  struct FSUI_Context * ctx;  
+  struct FSUI_Context * ctx;
 
   /**
    * Handle to the thread which performs the download.
@@ -199,7 +199,7 @@
    * decode the directory eagerly and start the other downloads in
    * parallel.  Once the directory is complete, we make sure that
    * really all files have been started and wait for their completion.
-   */ 
+   */
   int is_directory;
 
   /**

Modified: GNUnet/src/applications/fs/fsui/helper.c
===================================================================
--- GNUnet/src/applications/fs/fsui/helper.c    2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/fsui/helper.c    2005-03-20 23:54:53 UTC (rev 
464)
@@ -38,7 +38,7 @@
  * @return an ECRS URI for the given keywords, NULL
  *  if keywords is not legal (i.e. empty).
  */
-struct ECRS_URI * FSUI_parseCharKeywordURI(const char * input) { 
+struct ECRS_URI * FSUI_parseCharKeywordURI(const char * input) {
   char ** keywords;
   unsigned int num_Words;
   int inWord;
@@ -63,7 +63,7 @@
 
   if (num_Words == 0) {
     FREENONNULL(searchString);
-    LOG(LOG_FAILURE, 
+    LOG(LOG_FAILURE,
        _("No keywords specified!\n"));
     return NULL;
   }
@@ -81,7 +81,7 @@
   }
   uri = FSUI_parseArgvKeywordURI(num_Words,
                                 (const char**) keywords);
-  FREE(keywords); 
+  FREE(keywords);
   FREE(searchString);
   return uri;
 }
@@ -113,7 +113,7 @@
 
 
   for (i=0;i<num_keywords;i++) {
-    if (uriSize < uriLen + 1 + strlen(keywords[i])) 
+    if (uriSize < uriLen + 1 + strlen(keywords[i]))
       GROW(uriString,
           uriSize,
           uriSize + 4096);
@@ -124,11 +124,11 @@
     } else {
       if ( (i > 0) &&
           (0 != strcmp(keywords[i-1], _("AND"))) ) {
-       strcat(uriString, " "); 
+       strcat(uriString, " ");
        uriLen += 1;
       }
       strcat(uriString, keywords[i]);
-      uriLen += strlen(keywords[i]);      
+      uriLen += strlen(keywords[i]);
     }
   }
   uri = ECRS_stringToUri(uriString);

Modified: GNUnet/src/applications/fs/fsui/namespace_info.c
===================================================================
--- GNUnet/src/applications/fs/fsui/namespace_info.c    2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/fsui/namespace_info.c    2005-03-20 23:54:53 UTC 
(rev 464)
@@ -45,9 +45,9 @@
   fn = getConfigurationString(NULL, "GNUNET_HOME");
   fnBase = expandFileName(fn);
   FREE(fn);
-  fn = MALLOC(strlen(fnBase) + 
-             strlen(NS_DIR) + 
-             strlen(namespaceName) + 
+  fn = MALLOC(strlen(fnBase) +
+             strlen(NS_DIR) +
+             strlen(namespaceName) +
              6);
   strcpy(fn, fnBase);
   strcat(fn, DIR_SEPARATOR_STR);
@@ -86,9 +86,9 @@
   fn = getConfigurationString(NULL, "GNUNET_HOME");
   fnBase = expandFileName(fn);
   FREE(fn);
-  fn = MALLOC(strlen(fnBase) + 
-             strlen(NS_DIR) + 
-             strlen(namespaceName) + 
+  fn = MALLOC(strlen(fnBase) +
+             strlen(NS_DIR) +
+             strlen(namespaceName) +
              6);
   strcpy(fn, fnBase);
   strcat(fn, DIR_SEPARATOR_STR);
@@ -96,7 +96,7 @@
   strcat(fn, DIR_SEPARATOR_STR);
   strcat(fn, namespaceName);
   FREE(fnBase);
-  
+
   tag = getFileSize(fn);
   if (tag <= sizeof(int)) {
     FREE(fn);
@@ -109,7 +109,7 @@
     FREE(fn);
     return SYSERR;
   }
-  buf = MALLOC(tag);  
+  buf = MALLOC(tag);
   if (size != readFile(fn,
                       tag,
                       buf)) {
@@ -117,9 +117,9 @@
     FREE(fn);
     return SYSERR;
   }
-  
-  size = tag - sizeof(int);  
-  *ranking = ntohl(((int *) buf)[0]);  
+
+  size = tag - sizeof(int);
+  *ranking = ntohl(((int *) buf)[0]);
   if (OK != ECRS_deserializeMetaData(meta,
                                     &buf[sizeof(int)],
                                     size)) {
@@ -134,7 +134,7 @@
   FREE(buf);
   return OK;
 }
-                                           
+                                       
 
 /**
  * Create a new namespace (and publish an advertismement).
@@ -251,7 +251,7 @@
   if (c->ret == SYSERR)
     return;
   if (OK != enc2hash(fn,
-                    &id)) 
+                    &id))
     return; /* invalid name */
   if (OK != readNamespaceInfo(fn,
                              &meta,
@@ -271,7 +271,7 @@
 
 /**
  * List all available (local or non-local) namespaces.
- * 
+ *
  * @param local only list local namespaces (if NO, only
  *   non-local known namespaces are listed)
  */
@@ -295,13 +295,13 @@
     fn = getConfigurationString(NULL, "GNUNET_HOME");
     fnBase = expandFileName(fn);
     FREE(fn);
-    fn = MALLOC(strlen(fnBase) + 
-               strlen(NS_DIR) + 
+    fn = MALLOC(strlen(fnBase) +
+               strlen(NS_DIR) +
                4);
     strcpy(fn, fnBase);
     strcat(fn, DIR_SEPARATOR_STR);
     strcat(fn, NS_DIR);
-    
+
     scanDirectory(fn,
                  &listNamespaceHelper,
                  &cls);
@@ -337,7 +337,7 @@
 
     hash2enc(lastId, &enc);
     strcat(ret, (char*) &enc);
-  }  
+  }
   return ret;
 }
 
@@ -345,7 +345,7 @@
   cron_t updateInterval;
   cron_t lastPubTime;
   HashCode512 nextId;
-  HashCode512 thisId;  
+  HashCode512 thisId;
 };
 
 /**
@@ -371,10 +371,10 @@
                             lastId);
   size = getFileSize(fn);
   if ( (size == 0) ||
-       (size <= sizeof(struct UpdateData)) || 
+       (size <= sizeof(struct UpdateData)) ||
        (size > 1024 * 1024 * 16) )
     return SYSERR;
-  
+
   buf = MALLOC(size);
   if (size != readFile(fn,
                       size,    
@@ -449,11 +449,11 @@
         uri,
         strlen(uri)+1);
   FREE(uri);
-  GNUNET_ASSERT(OK == 
+  GNUNET_ASSERT(OK ==
                ECRS_serializeMetaData(fi->meta,
                                       &((char*)&buf[1])[strlen(uri)+1],
                                       metaSize,
-                                      NO));  
+                                      NO));
   fn = getUpdateDataFilename(nsname,
                             thisId);
   writeFile(fn,
@@ -464,12 +464,12 @@
   FREE(buf);
   return OK;
 }
-                         
+                       
 
 
 /**
  * Add an entry into a namespace (also for publishing
- * updates).  
+ * updates).
  *
  * @param name in which namespace to publish
  * @param updateInterval the desired frequency for updates
@@ -516,7 +516,7 @@
       if (lastInterval != updateInterval) {
        LOG(LOG_WARNING,
            _("Publication interval for periodic publication changed."));
-      }      
+      }
       /* try to compute tid and/or
         nid based on information read from lastId */
 
@@ -549,14 +549,14 @@
        /* sporadic ones are unpredictable,
           tid has been obtained from IO, pick random nid if
           not specified */
-       if (thisId != NULL) 
+       if (thisId != NULL)
          tid = *thisId; /* allow user override */      
        if (nextId == NULL) {
          makeRandomId(&nid);
        } else {
          nid = *nextId;
        }
-      }      
+      }
     } else { /* no previous ID found or given */
       if (nextId == NULL) {
        /* no previous block found and nextId not specified;
@@ -568,7 +568,7 @@
       if (thisId != NULL) {
        tid = *thisId;
       } else {
-       makeRandomId(&tid);  
+       makeRandomId(&tid);
       }
     }
   } else {
@@ -589,7 +589,7 @@
                            &nid,
                            dst,
                            md,
-                           uri);  
+                           uri);
   if (updateInterval != ECRS_SBLOCK_UPDATE_NONE) {
     fi.uri = (struct ECRS_URI*) uri;
     fi.meta = (struct ECRS_MetaData*) md;
@@ -626,7 +626,7 @@
   cron_t lastTime;
   cron_t nextTime;
   cron_t now;
-  
+
   if (cls->cnt == SYSERR)
     return;
   if (OK != enc2hash(fil,
@@ -701,7 +701,7 @@
  * Add a namespace to the set of known namespaces.
  * For all namespace advertisements that we discover
  * FSUI should automatically call this function.
- * 
+ *
  * @param ns the namespace identifier
  */
 void FSUI_addNamespaceInfo(const struct ECRS_URI * uri,
@@ -731,7 +731,7 @@
                       old,
                       ranking);
     ECRS_freeMetaData(old);
-  } else {  
+  } else {
     writeNamespaceInfo(name,
                       meta,
                       ranking);

Modified: GNUnet/src/applications/fs/fsui/search.c
===================================================================
--- GNUnet/src/applications/fs/fsui/search.c    2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/fsui/search.c    2005-03-20 23:54:53 UTC (rev 
464)
@@ -37,7 +37,7 @@
 static void processResult(const ECRS_FileInfo * fi,
                          FSUI_SearchList * pos) {
   FSUI_Event event;
-  
+
   GROW(pos->resultsReceived,
        pos->sizeResultsReceived,
        pos->sizeResultsReceived+1);
@@ -89,7 +89,7 @@
                        pos);
          ECRS_freeUri(rp->fi.uri);
          ECRS_freeMetaData(rp->fi.meta);
-         pos->unmatchedResultsReceived[i] 
+         pos->unmatchedResultsReceived[i]
            = 
pos->unmatchedResultsReceived[pos->sizeUnmatchedResultsReceived-1];
          GROW(pos->unmatchedResultsReceived,
               pos->sizeUnmatchedResultsReceived,
@@ -159,7 +159,7 @@
       return SYSERR;
     }
     pos = pos->next;
-  }  
+  }
   pos = MALLOC(sizeof(FSUI_SearchList));
   pos->signalTerminate = NO;
   pos->uri = ECRS_dupUri(uri);
@@ -219,21 +219,21 @@
        GROW(pos->unmatchedResultsReceived[i].matchingKeys,
             pos->unmatchedResultsReceived[i].matchingKeyCount,
             0);
-      }     
+      }
       GROW(pos->unmatchedResultsReceived,
           pos->sizeUnmatchedResultsReceived,
-          0);      
+          0);
       if (prev == NULL)
        ctx->activeSearches = pos->next;
       else
        prev->next = pos->next;
-      FREE(pos);      
+      FREE(pos);
       MUTEX_UNLOCK(&ctx->lock);
       return OK;
     }
-    prev = pos;    
+    prev = pos;
     pos = pos->next;
-  }  
+  }
   MUTEX_UNLOCK(&ctx->lock);
   return SYSERR;
 }
@@ -264,7 +264,7 @@
     }
     ret++;
     pos = pos->next;
-  }  
+  }
   MUTEX_UNLOCK(&ctx->lock);
   return ret;
 }

Modified: GNUnet/src/applications/fs/fsui/upload.c
===================================================================
--- GNUnet/src/applications/fs/fsui/upload.c    2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/fsui/upload.c    2005-03-20 23:54:53 UTC (rev 
464)
@@ -51,7 +51,7 @@
   struct ECRS_MetaData * meta;
   struct ECRS_URI * uri;
   struct ECRS_URI * globalUri;
-  char * filename;  
+  char * filename;
   char * main_filename;
   unsigned long long main_completed;
   unsigned long long main_total;
@@ -82,9 +82,9 @@
   event.data.UploadProgress.start_time = utc->start_time;
   event.data.UploadProgress.main_completed = utc->main_completed + 
completedBytes;
   event.data.UploadProgress.main_total = utc->main_total;
-  event.data.UploadProgress.eta = eta; 
+  event.data.UploadProgress.eta = eta;
   if (totalBytes > 0) {
-    event.data.UploadProgress.main_eta 
+    event.data.UploadProgress.main_eta
       = (cron_t) (utc->start_time +
                  (((double)(now - 
utc->start_time/(double)(utc->main_completed+completedBytes))))
                   * (double)utc->main_total);
@@ -93,7 +93,7 @@
   }
   utc->ctx->ecb(utc->ctx->ecbClosure,
                &event);
-} 
+}
 
 /**
  * Take the current directory entries from utc, create
@@ -123,7 +123,7 @@
     lastSlash--;
   while ( (lastSlash > 0) &&
          (utc->filename[lastSlash] != DIR_SEPARATOR))
-    lastSlash--;  
+    lastSlash--;
   ECRS_delFromMetaData(*meta,
                       EXTRACTOR_FILENAME,
                       NULL);
@@ -137,18 +137,18 @@
                                 &len,
                                 utc->dir.fiCount,
                                 utc->dir.fis,
-                                *meta)) {    
+                                *meta)) {
     utc->main_total += len;
 
     tempName = STRDUP("/tmp/gnunetdir.XXXXXX");
     handle = mkstemp(tempName);
     if (handle == -1) {
-      LOG_FILE_STRERROR(LOG_ERROR, tempName, "mkstemp");     
+      LOG_FILE_STRERROR(LOG_ERROR, tempName, "mkstemp");
     } else if (len != write(handle,
                            data,
                            len)) {
       LOG_FILE_STRERROR(LOG_ERROR, tempName, "write");
-    } else {   
+    } else {
       CLOSE(handle);
       ret = ECRS_uploadFile(tempName,
                            NO,
@@ -165,9 +165,9 @@
        event.data.UploadComplete.total = utc->main_total;
        event.data.UploadComplete.filename = utc->filename;
        event.data.UploadComplete.uri = *uri;
-       event.data.UploadComplete.eta 
+       event.data.UploadComplete.eta
          = (cron_t) (utc->start_time +
-                     (((double)(cronTime(NULL) 
+                     (((double)(cronTime(NULL)
                                 - 
utc->start_time/(double)(utc->main_completed+len))))
                      * (double)utc->main_total);
        event.data.UploadComplete.start_time = utc->start_time;
@@ -192,7 +192,7 @@
        utc->dir.fiCount,
        0);
   if (ret != OK) {
-    ECRS_freeMetaData(*meta); 
+    ECRS_freeMetaData(*meta);
     *meta = NULL;
   }
   return ret;
@@ -233,9 +233,9 @@
     event.data.UploadComplete.filename = utc->filename;
     event.data.UploadComplete.uri = uri;
     utc->main_completed += getFileSize(fn);
-    event.data.UploadComplete.eta 
+    event.data.UploadComplete.eta
       = (cron_t) (utc->start_time +
-                 (((double)(cronTime(NULL) 
+                 (((double)(cronTime(NULL)
                             - utc->start_time/(double)(utc->main_completed))))
                  * (double)utc->main_total);
     event.data.UploadComplete.start_time = utc->start_time;
@@ -246,9 +246,9 @@
     meta = ECRS_createMetaData();
     ECRS_extractMetaData(meta,
                         fn,
-                        utc->extractors);    
+                        utc->extractors);
     ret = OK;
-  } else {    
+  } else {
     scanDirectory(fn,
                  (DirectoryEntryCallback)&dirEntryCallback,
                  utc);
@@ -257,7 +257,7 @@
                          &uri,
                          &meta);
   }
-  if (ret == OK) {   
+  if (ret == OK) {
     ECRS_addToMetaData(meta,
                       EXTRACTOR_FILENAME,
                       filename);
@@ -268,21 +268,21 @@
                         utc->priority,
                         utc->expiration,
                         uri,
-                        meta);        
+                        meta); 
       ECRS_freeUri(keywordUri);
-    }  
+    }
     if (utc->globalUri != NULL)
       ECRS_addToKeyspace(utc->globalUri,
                         utc->anonymityLevel,
                         utc->priority,
                         utc->expiration,
                         uri,
-                        meta);        
+                        meta); 
 
     GROW(utc->dir.fis,
         utc->dir.fiCount,
         utc->dir.fiCount+1);
-    utc->dir.fis[utc->dir.fiCount-1].meta = meta;    
+    utc->dir.fis[utc->dir.fiCount-1].meta = meta;
     utc->dir.fis[utc->dir.fiCount-1].uri = uri;
     FSUI_trackURI(&utc->dir.fis[utc->dir.fiCount-1]);
   }
@@ -338,7 +338,7 @@
     utc->filename = NULL;
     if (utc->meta == NULL)
       utc->meta = ECRS_createMetaData();
-    else 
+    else
       ECRS_delFromMetaData(utc->meta,
                           EXTRACTOR_FILENAME,
                           NULL);
@@ -390,31 +390,31 @@
                         utc->priority,
                         utc->expiration,
                         uri,
-                        utc->meta);           
+                        utc->meta);    
       ECRS_freeUri(keywordUri);
-    }  
+    }
     if (utc->globalUri != NULL)
       ECRS_addToKeyspace(utc->globalUri,
                         utc->anonymityLevel,
                         utc->priority,
                         utc->expiration,
                         uri,
-                        utc->meta);           
+                        utc->meta);    
     if (utc->uri != NULL)
       ECRS_addToKeyspace(utc->uri,
                         utc->anonymityLevel,
                         utc->priority,
                         utc->expiration,
                         uri,
-                        utc->meta);           
+                        utc->meta);    
   }
   utc->ctx->ecb(utc->ctx->ecbClosure,
-               &event);    
+               &event);
   fi.uri = uri;
   fi.meta = utc->meta;
   FSUI_publishToCollection(utc->ctx,
                           &fi);
-                          
+                       
   if (uri != NULL)
     ECRS_freeUri(uri);
 
@@ -450,7 +450,7 @@
                const char ** keywords) {
   FSUI_ThreadList * tl;
   UploadThreadClosure * utc;
-  
+
   utc = MALLOC(sizeof(UploadThreadClosure));
   utc->anonymityLevel = anonymityLevel;
   utc->priority = getConfigurationInt("FS",
@@ -465,7 +465,7 @@
   utc->uri = FSUI_parseArgvKeywordURI(keywordCount,
                                      keywords);
   utc->meta = ECRS_dupMetaData(md);
-  utc->doIndex = doIndex;  
+  utc->doIndex = doIndex;
   tl = MALLOC(sizeof(FSUI_ThreadList));
   utc->tl = tl;
   tl->isDone = NO;
@@ -473,7 +473,7 @@
                          (PThreadMain) &uploadThread,
                          utc,
                          16 * 1024)) {
-    LOG_STRERROR(LOG_ERROR, "PTHREAD_CREATE");  
+    LOG_STRERROR(LOG_ERROR, "PTHREAD_CREATE");
     FREE(tl);
     FREE(utc->main_filename);
     ECRS_freeMetaData(utc->meta);
@@ -484,8 +484,8 @@
 
   MUTEX_LOCK(&ctx->lock);
   tl->next = ctx->activeThreads;
-  ctx->activeThreads = tl->next;  
-  MUTEX_UNLOCK(&ctx->lock);  
+  ctx->activeThreads = tl->next;
+  MUTEX_UNLOCK(&ctx->lock);
   cleanupFSUIThreadList(ctx);
   return OK;
 }
@@ -516,7 +516,7 @@
                   const char ** keywords) {
   FSUI_ThreadList * tl;
   UploadThreadClosure * utc;
-  
+
   utc = MALLOC(sizeof(UploadThreadClosure));
   utc->ctx = ctx;
   utc->isRecursive = YES;
@@ -532,7 +532,7 @@
   utc->uri = FSUI_parseArgvKeywordURI(keywordCount,
                                      keywords);
   utc->meta = ECRS_dupMetaData(directoryMetaData);
-  utc->doIndex = doIndex;  
+  utc->doIndex = doIndex;
   tl = MALLOC(sizeof(FSUI_ThreadList));
   utc->tl = tl;
   tl->isDone = NO;
@@ -540,7 +540,7 @@
                          (PThreadMain) &uploadThread,
                          utc,
                          16 * 1024)) {
-    LOG_STRERROR(LOG_ERROR, "PTHREAD_CREATE");  
+    LOG_STRERROR(LOG_ERROR, "PTHREAD_CREATE");
     FREE(tl);
     FREE(utc->main_filename);
     ECRS_freeMetaData(utc->meta);
@@ -551,8 +551,8 @@
 
   MUTEX_LOCK(&ctx->lock);
   tl->next = ctx->activeThreads;
-  ctx->activeThreads = tl->next;  
-  MUTEX_UNLOCK(&ctx->lock);  
+  ctx->activeThreads = tl->next;
+  MUTEX_UNLOCK(&ctx->lock);
   cleanupFSUIThreadList(ctx);
   return OK;
 }

Modified: GNUnet/src/applications/fs/lib/fslib.c
===================================================================
--- GNUnet/src/applications/fs/lib/fslib.c      2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/lib/fslib.c      2005-03-20 23:54:53 UTC (rev 
464)
@@ -38,7 +38,7 @@
 typedef struct FS_SEARCH_CONTEXT {
   GNUNET_TCP_SOCKET * sock;
   PTHREAD_T thread;
-  Mutex * lock;  
+  Mutex * lock;
   SEARCH_HANDLE ** handles;
   unsigned int handleCount;
   unsigned int handleSize;
@@ -80,14 +80,14 @@
        BREAK();
        FREE(hdr);
        continue;
-      }      
+      }
       MUTEX_LOCK(ctx->lock);
       for (i=ctx->handleCount-1;i>=0;i--) {
        if (equalsHashCode512(&query,
                              &ctx->handles[i]->req->query[0])) {
          Datastore_Value * value;
 
-         if (ctx->handles[i]->callback != NULL) {          
+         if (ctx->handles[i]->callback != NULL) {      
            value = MALLOC(sizeof(Datastore_Value) + size);
            value->size = htonl(size + sizeof(Datastore_Value));
            value->type = htonl(getTypeOfBlock(size,
@@ -107,7 +107,7 @@
          }
        }
       }
-      MUTEX_UNLOCK(ctx->lock);      
+      MUTEX_UNLOCK(ctx->lock);
     } else {
       gnunet_util_sleep(delay);
       delay *= 2;
@@ -132,7 +132,7 @@
                          (PThreadMain) &processReplies,
                          ret,
                          16 * 1024))
-    DIE_STRERROR("PTHREAD_CREATE");  
+    DIE_STRERROR("PTHREAD_CREATE");
   return ret;
 }
 
@@ -156,7 +156,7 @@
  * Search for blocks matching the given key and type.
  *
  * @param timeout how long to search
- * @param anonymityLevel what are the anonymity 
+ * @param anonymityLevel what are the anonymity
  *        requirements for this request? 0 for no
  *        anonymity (DHT/direct transfer ok)
  * @param callback method to call for each result
@@ -193,7 +193,7 @@
   if (ctx->handleCount == ctx->handleSize) {
     GROW(ctx->handles,
         ctx->handleSize,
-        ctx->handleSize * 2 + 4);    
+        ctx->handleSize * 2 + 4);
   }
   ctx->handles[ctx->handleCount++] = ret;
   MUTEX_UNLOCK(ctx->lock);
@@ -222,14 +222,14 @@
 
   handle->req->header.type = htons(AFS_CS_PROTO_QUERY_STOP);
   writeToSocket(ctx->sock,
-               &handle->req->header);  
+               &handle->req->header);
   MUTEX_LOCK(ctx->lock);
   for (i=ctx->handleCount-1;i>=0;i--)
     if (ctx->handles[i] == handle) {
       ctx->handles[i] = ctx->handles[--ctx->handleCount];
       break;
     }
-  MUTEX_UNLOCK(ctx->lock);      
+  MUTEX_UNLOCK(ctx->lock);
   FREE(handle->req);
   FREE(handle);
 }
@@ -254,8 +254,8 @@
 }
 
 /**
- * Insert a block. 
- * 
+ * Insert a block.
+ *
  * @param block the block (properly encoded and all)
  * @return OK on success, SYSERR on error
  */
@@ -282,9 +282,9 @@
   if (OK != writeToSocket(sock,
                          &ri->header)) {
     FREE(ri);
-    return SYSERR; 
+    return SYSERR;
   }
-  FREE(ri);  
+  FREE(ri);
 
   if (OK != readTCPResult(sock,
                          &ret))
@@ -301,7 +301,7 @@
   int ret;
   RequestInitIndex *ri;
   unsigned int size, fnSize;
-  
+
   fnSize = strlen(fn);
   size = sizeof(RequestIndex) + fnSize;
   ri = MALLOC(size);
@@ -309,13 +309,13 @@
   ri->header.type = htons(AFS_CS_PROTO_INIT_INDEX);
   ri->fileId = *fileHc;
   memcpy(&ri[1], fn, fnSize);
-  
+
   LOG(LOG_DEBUG,
       "Sending index initialization request to gnunetd\n");
   if (OK != writeToSocket(sock,
         &ri->header)) {
     FREE(ri);
-    return SYSERR; 
+    return SYSERR;
   }
   FREE(ri);
   LOG(LOG_DEBUG,
@@ -327,15 +327,15 @@
 }
 
 /**
- * Index a block. 
- * 
+ * Index a block.
+ *
  * @param fileHc the hash of the entire file
  * @param block the data from the file (in plaintext)
  * @param offset the offset of the block into the file
  * @return OK on success, SYSERR on error
  */
 int FS_index(GNUNET_TCP_SOCKET * sock,
-            const HashCode512 * fileHc,          
+            const HashCode512 * fileHc,        
             const Datastore_Value * block,
             unsigned long long offset) {
   int ret;
@@ -359,7 +359,7 @@
   if (OK != writeToSocket(sock,
                          &ri->header)) {
     FREE(ri);
-    return SYSERR; 
+    return SYSERR;
   }
   FREE(ri);
   LOG(LOG_DEBUG,
@@ -372,15 +372,15 @@
 
 /**
  * Delete a block.  The arguments are the same as the ones for
- * FS_insert. 
- * 
+ * FS_insert.
+ *
  * @param block the block (properly encoded and all)
- * @return number of items deleted on success, 
+ * @return number of items deleted on success,
  *    SYSERR on error
  */
 int FS_delete(GNUNET_TCP_SOCKET * sock,
              const Datastore_Value * block) {
-  int ret;  
+  int ret;
   RequestDelete * rd;
   unsigned int size;
 
@@ -395,7 +395,7 @@
                          &rd->header)) {
     FREE(rd);
     BREAK();
-    return SYSERR; 
+    return SYSERR;
   }
   FREE(rd);
   if (OK != readTCPResult(sock,
@@ -408,7 +408,7 @@
 
 /**
  * Unindex a file.
- * 
+ *
  * @param hc the hash of the entire file
  * @return OK on success, SYSERR on error
  */
@@ -424,7 +424,7 @@
   ru.fileId = *hc;
   if (OK != writeToSocket(sock,
                          &ru.header))
-    return SYSERR; 
+    return SYSERR;
   if (OK != readTCPResult(sock,
                          &ret))
     return SYSERR;
@@ -433,7 +433,7 @@
 
 /**
  * Test if a file of the given hash is indexed.
- * 
+ *
  * @param hc the hash of the entire file
  * @return YES if so, NO if not, SYSERR on error
  */

Modified: GNUnet/src/applications/fs/lib/fslibtest.c
===================================================================
--- GNUnet/src/applications/fs/lib/fslibtest.c  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/lib/fslibtest.c  2005-03-20 23:54:53 UTC (rev 
464)
@@ -17,7 +17,7 @@
      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
      Boston, MA 02111-1307, USA.
 */
-/** 
+/**
  * @file applications/fs/lib/fslibtest.c
  * @brief testcase for fslib
  * @author Christian Grothoff
@@ -32,7 +32,7 @@
 
 #define CHECK(a) if (!(a)) { ok = NO; BREAK(); goto FAILURE; }
 
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   FREENONNULL(setConfigurationString("GNUNETD",
                                     "_MAGIC_",
@@ -98,14 +98,14 @@
   hash(&db->keyspace,
        sizeof(PublicKey),
        query);
-  freePrivateKey(kkey);  
+  freePrivateKey(kkey);
   return block;
 }
 
 
 typedef struct {
   Semaphore * sem;
-  int found; 
+  int found;
   int i;
 } TSC;
 
@@ -140,7 +140,7 @@
   fileBlockGetQuery((DBlock*) &blk[1],
                    ntohl(blk->size) - sizeof(Datastore_Value),
                    &ekey);
-  GNUNET_ASSERT(OK == 
+  GNUNET_ASSERT(OK ==
                fileBlockEncode((DBlock*) &blk[1],
                                ntohl(blk->size) - sizeof(Datastore_Value),
                                &ekey,
@@ -192,11 +192,11 @@
                           now + 30 * cronSECONDS,
                           (Datum_Iterator)&searchResultCB,
                           &closure);
-  addCronJob((CronJob) &abortSem, 
+  addCronJob((CronJob) &abortSem,
             30 * cronSECONDS,
-            0, 
+            0,
             closure.sem);
-  SEMAPHORE_DOWN(closure.sem);  
+  SEMAPHORE_DOWN(closure.sem);
   FS_stop_search(ctx,
                 handle);
   suspendCron();
@@ -260,7 +260,7 @@
                                ntohl(block->size) - sizeof(Datastore_Value),
                                &query,
                                &eblock));
-    CHECK(OK == FS_insert(sock, 
+    CHECK(OK == FS_insert(sock,
                          eblock));
     CHECK(OK == trySearch(ctx, i));
     CHECK(SYSERR != FS_delete(sock,
@@ -288,7 +288,7 @@
                                ntohl(block->size) - sizeof(Datastore_Value),
                                &query,
                                &eblock));
-    CHECK(OK == FS_insert(sock, 
+    CHECK(OK == FS_insert(sock,
                          eblock));
     CHECK(OK == trySearch(ctx, i));
     CHECK(1 == FS_delete(sock,
@@ -332,7 +332,7 @@
   gnunet_util_sleep(10 * cronSECONDS);
   FS_stop_search(ctx, hnd);
   CHECK(i == 0);
-                
+               
 
   /* just to check if it crashes... */
   FS_getAveragePriority(sock);
@@ -349,14 +349,14 @@
   if (daemon != -1) {
     if (0 != kill(daemon, SIGTERM))
       DIE_STRERROR("kill");
-    if (daemon != waitpid(daemon, &status, 0)) 
+    if (daemon != waitpid(daemon, &status, 0))
       DIE_STRERROR("waitpid");
-  
-    if ( (WEXITSTATUS(status) == 0) && 
+
+    if ( (WEXITSTATUS(status) == 0) &&
         (ok == YES) )
       return 0;
     else
-      return 1;    
+      return 1;
   } else
     return 0;
 }

Modified: GNUnet/src/applications/fs/module/fs.c
===================================================================
--- GNUnet/src/applications/fs/module/fs.c      2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/fs/module/fs.c      2005-03-20 23:54:53 UTC (rev 
464)
@@ -111,8 +111,8 @@
     return SYSERR;
   }
   gw = (GapWrapper*) value;
-  size = ntohl(gw->dc.size) 
-    - sizeof(GapWrapper) 
+  size = ntohl(gw->dc.size)
+    - sizeof(GapWrapper)
     + sizeof(Datastore_Value);
   if ( (OK != getQueryFor(size - sizeof(Datastore_Value),
                          (DBlock*)&gw[1],
@@ -130,7 +130,7 @@
   dv->anonymityLevel = htonl(0);
   et = ntohll(gw->timeout);
   cronTime(&now);
-  /* bound ET to MAX_MIGRATION_EXP from now */ 
+  /* bound ET to MAX_MIGRATION_EXP from now */
   if (et > now) {
     et -= now;
     et = et % MAX_MIGRATION_EXP;
@@ -149,7 +149,7 @@
     FREE(dv);
     return SYSERR;
   }
-  processResponse(key, dv); 
+  processResponse(key, dv);
   IFLOG(LOG_DEBUG,
        hash2enc(key,
                 &enc));
@@ -168,7 +168,7 @@
   EncName enc;
 
   IFLOG(LOG_DEBUG,
-       hash2enc(key, 
+       hash2enc(key,
                 &enc));
   LOG(LOG_DEBUG,
       "Found reply to query %s.\n",
@@ -178,7 +178,7 @@
         value,
         cls->prio);
   return OK;
-}                                  
+}                              
 
 static void get_complete_callback(DHT_GET_CLS * cls) {
   dht->get_stop(cls->rec);
@@ -194,7 +194,7 @@
  * Process a query from the client. Forwards to the network.
  *
  * @return SYSERR if the TCP connection should be closed, otherwise OK
- */ 
+ */
 static int csHandleRequestQueryStart(ClientHandle sock,
                                     const CS_HEADER * req) {
   const RequestSearch * rs;
@@ -212,12 +212,12 @@
   LOG(LOG_DEBUG,
       "FS received QUERY START (query: %s)\n",
       &enc);
-  trackQuery(&rs->query[0], 
+  trackQuery(&rs->query[0],
             ntohl(rs->type),
             sock);
   keyCount = 1 + (ntohs(req->size) - sizeof(RequestSearch)) / 
sizeof(HashCode512);
   gap->get_start(ntohl(rs->type),
-                ntohl(rs->anonymityLevel),              
+                ntohl(rs->anonymityLevel),             
                 keyCount,
                 &rs->query[0],
                 ntohll(rs->expiration),
@@ -246,7 +246,7 @@
  * Stop processing a query.
  *
  * @return SYSERR if the TCP connection should be closed, otherwise OK
- */ 
+ */
 static int csHandleRequestQueryStop(ClientHandle sock,
                                    const CS_HEADER * req) {
   RequestSearch * rs;
@@ -292,9 +292,9 @@
     return SYSERR;
   }
   ri = (const RequestInsert*) req;
-  datum = MALLOC(sizeof(Datastore_Value) + 
+  datum = MALLOC(sizeof(Datastore_Value) +
                 ntohs(req->size) - sizeof(RequestInsert));
-  datum->size = htonl(sizeof(Datastore_Value) + 
+  datum->size = htonl(sizeof(Datastore_Value) +
                      ntohs(req->size) - sizeof(RequestInsert));
   datum->expirationTime = ri->expiration;
   datum->prio = ri->prio;
@@ -330,7 +330,7 @@
     cron_t now;
     cron_t et;
     DHT_PUT_CLS * cls;
-    
+
     size = sizeof(GapWrapper) +
       ntohs(ri->header.size) - sizeof(RequestInsert) -
       sizeof(Datastore_Value);
@@ -360,7 +360,7 @@
   }
 
   FREE(datum);
-  return coreAPI->sendValueToClient(sock, 
+  return coreAPI->sendValueToClient(sock,
                                    ret);
 }
 
@@ -373,14 +373,14 @@
   char *fn;
   RequestInitIndex *ri;
   int fnLen;
-  
+
   if (ntohs(req->size) < sizeof(RequestInitIndex)) {
     BREAK();
     return SYSERR;
   }
-  
+
   ri = (RequestInitIndex *) req;
-  
+
   fnLen = ntohs(ri->header.size) - sizeof(RequestInitIndex);
 #if CYGWIN
   if (fnLen > _MAX_PATH)
@@ -389,10 +389,10 @@
   fn = MALLOC(fnLen + 1);
   strncpy(fn, (char*) &ri[1], fnLen+1);
   fn[fnLen] = 0;
-  
+
   ret = ONDEMAND_initIndex(&ri->fileId,
           fn);
-          
+
   FREE(fn);
 
   LOG(LOG_DEBUG,
@@ -411,7 +411,7 @@
                                const CS_HEADER * req) {
   int ret;
   const RequestIndex * ri;
-  
+
   if (ntohs(req->size) < sizeof(RequestIndex)) {
     BREAK();
     return SYSERR;
@@ -439,10 +439,10 @@
  * continue.
  */
 static int completeValue(const HashCode512 * key,
-                        const Datastore_Value * value, 
+                        const Datastore_Value * value,
                         void * closure) {
   Datastore_Value * comp = closure;
-  
+
   if ( (comp->size != value->size) ||
        (0 != memcmp(&value[1],
                    &comp[1],
@@ -474,12 +474,12 @@
   HashCode512 query;
   unsigned int type;
   EncName enc;
-  
+
   if (ntohs(req->size) < sizeof(RequestDelete)) {
     BREAK();
     return SYSERR;
   }
-  rd = (const RequestDelete*) req;  
+  rd = (const RequestDelete*) req;
   value = MALLOC(sizeof(Datastore_Value) +
                 ntohs(req->size) - sizeof(RequestDelete));
   value->size = ntohl(sizeof(Datastore_Value) +
@@ -519,7 +519,7 @@
   LOG(LOG_DEBUG,
       "Sending confirmation (%s) of delete request to client\n",
       ret != SYSERR ? "success" : "failure");
-  return coreAPI->sendValueToClient(sock, 
+  return coreAPI->sendValueToClient(sock,
                                    ret);
 }
 
@@ -530,18 +530,18 @@
                                  const CS_HEADER * req) {
   int ret;
   RequestUnindex * ru;
-  
+
   if (ntohs(req->size) != sizeof(RequestUnindex)) {
     BREAK();
     return SYSERR;
   }
-  ru = (RequestUnindex*) req;  
+  ru = (RequestUnindex*) req;
   LOG(LOG_DEBUG,
       "FS received REQUEST UNINDEX\n");
   ret = ONDEMAND_unindex(datastore,
                         ntohl(ru->blocksize),
                         &ru->fileId);
-  return coreAPI->sendValueToClient(sock, 
+  return coreAPI->sendValueToClient(sock,
                                    ret);
 }
 
@@ -554,17 +554,17 @@
                                      const CS_HEADER * req) {
   int ret;
   RequestTestindex * ru;
-  
+
   if (ntohs(req->size) != sizeof(RequestTestindex)) {
     BREAK();
     return SYSERR;
   }
-  ru = (RequestTestindex*) req;  
+  ru = (RequestTestindex*) req;
   LOG(LOG_DEBUG,
       "FS received REQUEST TESTINDEXED\n");
   ret = ONDEMAND_testindexed(datastore,
                             &ru->fileId);
-  return coreAPI->sendValueToClient(sock, 
+  return coreAPI->sendValueToClient(sock,
                                    ret);
 }
 
@@ -576,7 +576,7 @@
                                         const CS_HEADER * req) {
   LOG(LOG_DEBUG,
       "FS received REQUEST GETAVGPRIORITY\n");
-  return coreAPI->sendValueToClient(sock, 
+  return coreAPI->sendValueToClient(sock,
                                    gap->getAvgPriority());
 }
 
@@ -619,7 +619,7 @@
     xvalue = NULL;
     value = invalue;
   }
-                  
+               
   ret = isDatumApplicable(ntohl(value->type),
                          ntohl(value->size) - sizeof(Datastore_Value),
                          (const DBlock*) &value[1],
@@ -699,7 +699,7 @@
       return OK;
     }
   }
-  
+
   gw = MALLOC(size);
   gw->dc.size = htonl(size);
   et = ntohll(value->expirationTime);
@@ -767,7 +767,7 @@
                         &gapGetConverter,
                         &myClosure);
   }
-  if (ret != SYSERR) 
+  if (ret != SYSERR)
     ret = datastore->get(&keys[0],
                         type,
                         &gapGetConverter,
@@ -778,7 +778,7 @@
                              were found */
   return ret;
 }
-  
+
 /**
  * Remove an item from the datastore.
  *
@@ -800,7 +800,7 @@
  * @param cls argument to processor
  * @return number of results, SYSERR on error
  */
-static int gapIterate(void * closure,           
+static int gapIterate(void * closure,          
                      DataProcessor processor,
                      void * cls) {
   BREAK(); /* gap does not use 'iterate' */
@@ -938,7 +938,7 @@
   unsigned int t;
   const GapWrapper * gw;
 
-  if (size < sizeof(GapWrapper)) { 
+  if (size < sizeof(GapWrapper)) {
     BREAK();
     return NO;
   }
@@ -949,19 +949,19 @@
        (equalsHashCode512(&q,
                          primaryKey)) &&
        ( (type == ANY_BLOCK) ||
-        (type == (t = getTypeOfBlock(size - sizeof(GapWrapper), 
+        (type == (t = getTypeOfBlock(size - sizeof(GapWrapper),
                                      (const DBlock*)&gw[1]) ) ) ) ) {
     switch(type) {
     case D_BLOCK:
       return YES;
-    default: 
+    default:
       return NO;
     }
   } else
     return NO;
 }
 
-  
+
 /**
  * Initialize the FS module. This method name must match
  * the library name (libgnunet_XXX => initialize_XXX).
@@ -972,8 +972,8 @@
   static Blockstore dsGap;
   static Blockstore dsDht;
 
-  hash("GNUNET_FS", 
-       strlen("GNUNET_FS"), 
+  hash("GNUNET_FS",
+       strlen("GNUNET_FS"),
        &dht_table);
   if (getConfigurationInt("FS",
                          "QUOTA") <= 0) {
@@ -997,7 +997,7 @@
   // dht = capi->requestService("dht");
   dht = NULL;
 
-  coreAPI = capi;  
+  coreAPI = capi;
   MUTEX_CREATE(&lock);
   dsGap.closure = NULL;
   dsGap.get = &gapGet;
@@ -1006,7 +1006,7 @@
   dsGap.iterate = &gapIterate;
   initQueryManager(capi);
   gap->init(&dsGap, &uniqueReplyIdentifier);
-  
+
   if (dht != NULL) {
     dsDht.closure = NULL;
     dsDht.get = &dhtGet;
@@ -1014,7 +1014,7 @@
     dsDht.del = &gapDel; /* exactly the same method for gap/dht*/
     dsDht.iterate = &gapIterate;  /* exactly the same method for gap/dht*/
     dht->join(&dsDht, &dht_table);
-  } 
+  }
 
   LOG(LOG_DEBUG,
       _("'%s' registering client handlers %d %d %d %d %d %d %d %d %d %d\n"),
@@ -1057,8 +1057,8 @@
   if (dht != NULL) {
     LOG(LOG_INFO,
        "Leaving DHT (this may take a while).");
-    dht->leave(&dht_table, 
-              15 * cronSECONDS); 
+    dht->leave(&dht_table,
+              15 * cronSECONDS);
     LOG(LOG_INFO,
        "Leaving DHT complete.");
 

Modified: GNUnet/src/applications/fs/module/migration.c
===================================================================
--- GNUnet/src/applications/fs/module/migration.c       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/module/migration.c       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -49,7 +49,7 @@
  */
 static DHT_ServiceAPI * dht;
 
-                                 
+                               
 /**
  * Callback method for pushing content into the network.
  * The method chooses either a "recently" deleted block
@@ -76,7 +76,7 @@
   unsigned int size;
   cron_t et;
   cron_t now;
- 
+
   ret = 0;
   if (OK == datastore->getRandom(&receiver->hashPubKey,
                                 padding,
@@ -99,13 +99,13 @@
           size - sizeof(GapWrapper));
     /* FIXME: check anonymity level,
        if 0, consider using DHT migration instead;
-       if high, consider traffic volume before 
+       if high, consider traffic volume before
        migrating */
     FREE(content);
     ret = gap->tryMigrate(&gw->dc,
                          &key,
                          position,
-                         padding);  
+                         padding);
     FREE(gw);
   }
   return ret;

Modified: GNUnet/src/applications/fs/module/migration.h
===================================================================
--- GNUnet/src/applications/fs/module/migration.h       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/module/migration.h       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -36,19 +36,19 @@
 
 
 /**
- * What is the maximum expiration time for migrated content? 
+ * What is the maximum expiration time for migrated content?
  *
  * This is a non-trivial issue.  If we have a ceiling for migration
  * time, it would violate anonymity if we send out content with an
  * expiration time above that ceiling (since it would expose the
  * content to originate from this peer).  But we want to store a
  * higher expiration time for our content in the DB.
- * 
+ *
  * A first idea would be to pick a random time smaller than the limit
  * for outgoing content; that does not _quite_ work since that could
  * also expose us as the originator: only for our own content the
  * expiration time would randomly go up and down.
- * 
+ *
  * The current best solution is to first bound the expiration time by
  * this ceiling (for inbound and outbound ETs, not for the database
  * entries locally) using modulo (to, in practice, get a constant
@@ -74,7 +74,7 @@
  * that content stays around longer.  Finally, clients (UI) may want
  * to filter / rank / display search results with their current
  * expiration to give the user some indication about availability.
- * 
+ *
  */
 #define MAX_MIGRATION_EXP (1L * cronMONTHS)
 

Modified: GNUnet/src/applications/fs/module/ondemand.c
===================================================================
--- GNUnet/src/applications/fs/module/ondemand.c        2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/module/ondemand.c        2005-03-20 23:54:53 UTC 
(rev 464)
@@ -29,7 +29,7 @@
 #include "ecrs_core.h"
 #include "ondemand.h"
 
-#define TRACK_INDEXED_FILES NO 
+#define TRACK_INDEXED_FILES NO
 #define TRACKFILE "indexed_requests.txt"
 
 /**
@@ -58,7 +58,7 @@
    * of the file in the on-demand datastore.
    */
   HashCode512 fileId;
-  
+
 } OnDemandBlock;
 
 static char * getOnDemandFile(const HashCode512 * fileId) {
@@ -88,10 +88,10 @@
  * by aborting the iteration.
  */
 static int checkPresent(const HashCode512 * key,
-                       const Datastore_Value * value, 
+                       const Datastore_Value * value,
                        void * closure) {
   Datastore_Value * comp = closure;
-  
+
   if ( (comp->size != value->size) ||
        (0 != memcmp(&value[1],
                    &comp[1],
@@ -113,7 +113,7 @@
   char * serverFN;
   char unavail_key[256];
 
-  serverDir 
+  serverDir
     = getConfigurationString("FS",
                             "INDEX-DIRECTORY");
   if (!serverDir) {
@@ -121,20 +121,20 @@
                                       "GNUNETD_HOME");
     if (!serverDir)
       return SYSERR;
-    
-    serverDir = REALLOC(serverDir, 
-                       strlen(serverDir) + 
+
+    serverDir = REALLOC(serverDir,
+                       strlen(serverDir) +
                        strlen("/data/shared/") + 1);
     strcat(serverDir, "/data/shared/");
   }
-  
+
   serverFN = MALLOC(strlen(serverDir) + 2 + sizeof(EncName));
   strcpy(serverFN,
         serverDir);
-  
+
   /* Just in case... */
   mkdirp(serverDir);
-   
+
   FREE(serverDir);
   strcat(serverFN,
         DIR_SEPARATOR_STR);
@@ -151,8 +151,8 @@
           256,
           "FIRST_UNAVAILABLE-%s",
           (char*)&enc);
-  stateUnlinkFromDB(unavail_key);  
-  FREE(serverFN);  
+  stateUnlinkFromDB(unavail_key);
+  FREE(serverFN);
   return YES;
 }
 
@@ -195,9 +195,9 @@
   /* compute the primary key */
   fileBlockGetQuery(content,
                    size,
-                   &key);  
+                   &key);
   /* extra check */
-  { 
+  {
     Datastore_Value * dsvalue;
     if (OK != fileBlockEncode(content,
                              size,
@@ -220,7 +220,7 @@
                       ONDEMAND_BLOCK,
                       &checkPresent,
                       &odb.header);
-  if (ret <= 0) {   
+  if (ret <= 0) {
     ret = datastore->put(&key,
                         &odb.header);
   } else {
@@ -267,9 +267,9 @@
     EncName enc;
     cron_t *first_unavail;
     struct stat linkStat;
-       
+
     LOG_FILE_STRERROR(LOG_ERROR, "open", fn);
-    
+
     /* Is the symlink there? */
     if (LSTAT(fn, &linkStat) == -1) {
       /* No, we have deleted it previously.
@@ -299,16 +299,16 @@
          ofn = MALLOC(len);
          while ( ((ret = READLINK(fn, ofn, len)) == -1) &&
                  (errno == ENAMETOOLONG) &&
-                 (len < 4 * 1024 * 1024) ) 
+                 (len < 4 * 1024 * 1024) )
            GROW(ofn, len, len*2);
-                           
+               
           if (ret != -1) {
-            LOG(LOG_ERROR, 
+            LOG(LOG_ERROR,
                _("Because the file '%s' has been unavailable for 3 days"
                  " it got removed from your share.  Please unindex files 
before"
                  " deleting them as the index now contains invalid 
references!"),
                ofn);
-         } 
+         }
          FREE(ofn);
           datastore->del(query, dbv);
           stateUnlinkFromDB(unavail_key);
@@ -316,7 +316,7 @@
         }
       }
     }
-    
+
     FREE(fn);
     return SYSERR;
   }
@@ -327,7 +327,7 @@
     char * afsDir;
     char * scratch;
     int n;
-  
+
     afsDir = getFileName("FS",
                         "DIR",
                         _("Configuration file must specify directory for"
@@ -340,16 +340,16 @@
             "%s/%s", afsDir, TRACKFILE);
     fp = FOPEN(scratch, "a");
     FPRINTF(fp,
-           "%u %llu\n", 
-           ntohs(ce->fileNameIndex), 
+           "%u %llu\n",
+           ntohs(ce->fileNameIndex),
            (unsigned long long)TIME(NULL));
     fclose(fp);
     FREE(scratch);
     FREE(afsDir);
   }
 #endif
-  if (ntohll(odb->fileOffset) != lseek(fileHandle, 
-                                      ntohll(odb->fileOffset), 
+  if (ntohll(odb->fileOffset) != lseek(fileHandle,
+                                      ntohll(odb->fileOffset),
                                       SEEK_SET)) {
     LOG_FILE_STRERROR(LOG_WARNING, "lseek", fn);
     FREE(fn);
@@ -359,7 +359,7 @@
   db = MALLOC(sizeof(DBlock) + ntohl(odb->blockSize));
   db->type = htonl(D_BLOCK);
   iobuf = (char*) &db[1];
-  blen = READ(fileHandle, 
+  blen = READ(fileHandle,
              iobuf,
              ntohl(odb->blockSize));
   if (blen != ntohl(odb->blockSize)) {
@@ -377,11 +377,11 @@
   FREE(fn);
   if (ret == SYSERR)
     return SYSERR;
-  
+
   (*enc)->anonymityLevel = dbv->anonymityLevel;
   (*enc)->expirationTime = dbv->expirationTime;
   (*enc)->prio = dbv->prio;
-  return OK;   
+  return OK;
 }
 
 /**
@@ -395,10 +395,10 @@
   int fd;
 
   fn = getOnDemandFile(fileId);
-  fd = OPEN(fn, 
+  fd = OPEN(fn,
            O_RDONLY);
   FREE(fn);
-  if(fd == -1) 
+  if(fd == -1)
     return NO;
   CLOSE(fd);
   return YES;
@@ -412,10 +412,10 @@
  * continue.
  */
 static int completeValue(const HashCode512 * key,
-                        const Datastore_Value * value, 
+                        const Datastore_Value * value,
                         void * closure) {
   Datastore_Value * comp = closure;
-  
+
   if ( (comp->size != value->size) ||
        (0 != memcmp(&value[1],
                    &comp[1],
@@ -439,7 +439,7 @@
  * filesystem and all of the corresponding obd blocks from the
  * datastore.  Note that the IBlocks are NOT removed by this function.
  *
- * @param blocksize the size of each of the 
+ * @param blocksize the size of each of the
  *        indexed blocks (required to break
  *        up the file properly when computing
  *        the keys of the odb blocks).
@@ -463,14 +463,14 @@
   LOG(LOG_DEBUG,
       "Removing on-demand encoded data stored in '%s'.\n",
       fn);
-  fd = OPEN(fn, 
+  fd = OPEN(fn,
 #ifdef O_LARGEFILE
            O_RDONLY | O_LARGEFILE,
 #else
            O_RDONLY,
 #endif
            S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); /* 644 */
-  if(fd == -1) {    
+  if(fd == -1) {
     LOG_FILE_STRERROR(LOG_ERROR, "open", fn);
     FREE(fn);
     return SYSERR;
@@ -504,7 +504,7 @@
     /* compute the primary key */
     fileBlockGetQuery(block,
                      delta + sizeof(DBlock),
-                     &key);  
+                     &key);
     if (SYSERR == datastore->get(&key,
                                 ONDEMAND_BLOCK,
                                 &completeValue,
@@ -513,7 +513,7 @@
                           &odb.header);
     else /* not found */
       ret = SYSERR;
-    if (ret == SYSERR) { 
+    if (ret == SYSERR) {
       IFLOG(LOG_WARNING,
            hash2enc(&key,
                     &enc));
@@ -527,14 +527,14 @@
   FREE(block);
   CLOSE(fd);
   UNLINK(fn);
-  
+
   /* Remove information about unavailability */
   SNPRINTF(unavail_key,
           256,
           "FIRST_UNAVAILABLE-%s",
           (char*)&enc);
   stateUnlinkFromDB(unavail_key);
-  
+
   FREE(fn);
   return OK;
 }

Modified: GNUnet/src/applications/fs/module/ondemand.h
===================================================================
--- GNUnet/src/applications/fs/module/ondemand.h        2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/module/ondemand.h        2005-03-20 23:54:53 UTC 
(rev 464)
@@ -66,7 +66,7 @@
  * filesystem and all of the corresponding obd blocks from the
  * datastore.  Note that the IBlocks are NOT removed by this function.
  *
- * @param blocksize the size of each of the 
+ * @param blocksize the size of each of the
  *        indexed blocks (required to break
  *        up the file properly when computing
  *        the keys of the odb blocks).

Modified: GNUnet/src/applications/fs/module/querymanager.c
===================================================================
--- GNUnet/src/applications/fs/module/querymanager.c    2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/module/querymanager.c    2005-03-20 23:54:53 UTC 
(rev 464)
@@ -104,7 +104,7 @@
 }
 
 /**
- * Stop keeping track of a query. 
+ * Stop keeping track of a query.
  *
  * @param msg the query
  * @param client where did the query come from?
@@ -143,9 +143,9 @@
                            key)) &&
         ( (trackers[i]->type == ANY_BLOCK) ||
           (trackers[i]->type == ntohl(value->type)) ) ) {
-      rc = MALLOC(sizeof(ReplyContent) + 
+      rc = MALLOC(sizeof(ReplyContent) +
                  ntohl(value->size) - sizeof(Datastore_Value));
-      rc->header.size = htons(sizeof(ReplyContent) + 
+      rc->header.size = htons(sizeof(ReplyContent) +
                              ntohl(value->size) - sizeof(Datastore_Value));
       rc->header.type = htons(AFS_CS_PROTO_RESULT);
       memcpy(&rc[1],
@@ -165,7 +165,7 @@
   }
   MUTEX_UNLOCK(&queryManagerLock);
 }
- 
+
 /**
  * Initialize the query management.
  */

Modified: GNUnet/src/applications/fs/module/querymanager.h
===================================================================
--- GNUnet/src/applications/fs/module/querymanager.h    2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/module/querymanager.h    2005-03-20 23:54:53 UTC 
(rev 464)
@@ -50,7 +50,7 @@
                const ClientHandle client);
 
 /**
- * Stop keeping track of a query. 
+ * Stop keeping track of a query.
  *
  * @param msg the query
  * @param client where did the query come from?
@@ -66,5 +66,5 @@
  */
 void processResponse(const HashCode512 * key,
                     const Datastore_Value * value);
- 
+
 #endif

Modified: GNUnet/src/applications/fs/tools/gnunet-delete.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-delete.c    2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/tools/gnunet-delete.c    2005-03-20 23:54:53 UTC 
(rev 464)
@@ -22,7 +22,7 @@
  * Tool to delete files that were indexed with gnunet-insert.
  *
  * @author Christian Grothoff
- * @file applications/afs/tools/gnunet-delete.c 
+ * @file applications/afs/tools/gnunet-delete.c
  */
 
 #include "gnunet_afs_esed2.h"
@@ -36,7 +36,7 @@
   if (*(int*)verboselevel == YES) {
     printf(_("%8u of %8u bytes deleted."),
           (unsigned int) stats->progress,
-          (unsigned int) stats->filesize);  
+          (unsigned int) stats->filesize);
     printf("\r");
   }
 }
@@ -77,13 +77,13 @@
       { "file",          1, 0, 'f' },
       { "verbose",       0, 0, 'V' },
       { 0,0,0,0 }
-    };    
+    };
     c = GNgetopt_long(argc,
-                     argv, 
-                     "vhdc:L:H:Vf:", 
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     argv,
+                     "vhdc:L:H:Vf:",
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
@@ -93,20 +93,20 @@
                                         "VERBOSE",
                                         "YES"));
       break;
-    case 'f': 
+    case 'f':
       FREENONNULL(setConfigurationString("GNUNET-DELETE",
                                         "FILENAME",
                                         GNoptarg));
-      break;    
-    case 'v': 
+      break;
+    case 'v':
       printf("GNUnet v%s, gnunet-delete v%s\n",
-            VERSION, 
+            VERSION,
             AFS_VERSION);
       return SYSERR;
-    case 'h': 
-      printhelp(); 
+    case 'h':
+      printhelp();
       return SYSERR;
-    default: 
+    default:
       LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
       return SYSERR;
@@ -121,14 +121,14 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return return 0 for ok, -1 on error
- */   
+ */
 int main(int argc, char ** argv) {
   int beVerbose;
   GNUNET_TCP_SOCKET * sock;
   int ok;
   char * filename;
-  
-  if (SYSERR == initUtil(argc, argv, &parseOptions)) 
+
+  if (SYSERR == initUtil(argc, argv, &parseOptions))
     return 0;
   beVerbose = testConfigurationString("GNUNET-INSERT",
                                      "VERBOSE",
@@ -152,13 +152,13 @@
             "Probably a few blocks were already missing from the database.\n"),
           filename);
   }
-  releaseClientSocket(sock); 
+  releaseClientSocket(sock);
   doneUtil();
   FREE(filename);
   if (ok == OK)
     return 0;
-  else 
+  else
     return -1;
-}  
+}
 
 /* end of gnunet-delete.c */

Modified: GNUnet/src/applications/fs/tools/gnunet-directory.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-directory.c 2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/tools/gnunet-directory.c 2005-03-20 23:54:53 UTC 
(rev 464)
@@ -20,15 +20,15 @@
 
 /**
  * @file applications/fs/tools/gnunet-directory.c
- * @brief tool to list the entries stored in the database holding 
- *        files for building directories, to delete all of these 
+ * @brief tool to list the entries stored in the database holding
+ *        files for building directories, to delete all of these
  *        entries and to display the contents of  directories.
  * @author Christian Grothoff
  */
 
 #include "platform.h"
 #include "gnunet_fsui_lib.h"
-  
+
 static char ** filenames;
 static int filenamescnt;
 
@@ -46,16 +46,16 @@
 }
 
 static void printMeta(const struct ECRS_MetaData * meta) {
-  ECRS_getMetaData(meta, 
+  ECRS_getMetaData(meta,
                   &itemPrinter,
                   NULL);
 }
 
 static int printNode(const ECRS_FileInfo * fi,
                     const HashCode512 * key,
-                    void * unused) {  
+                    void * unused) {
   char * string;
-  
+
   string = ECRS_uriToString(fi->uri);
   printf("%s:\n", string);
   FREE(string);
@@ -72,7 +72,7 @@
 
   name = expandFileName(filename);
   printf(_("==> Directory '%s':\n"),
-        name); 
+        name);
   len = getFileSize(name);
   if (len <= 0) {
     printf(_("=\tError reading directory.\n"));
@@ -130,9 +130,9 @@
 }
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   int c;
 
@@ -145,19 +145,19 @@
       { "track",   0, 0, 't' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
+                     argv,
                      "c:hklL:tv",
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
-      continue;    
+      continue;
     switch(c) {
-    case 'h': 
-      printhelp(); 
+    case 'h':
+      printhelp();
       return SYSERR;
     case 'k':
       do_kill = YES;
@@ -168,9 +168,9 @@
     case 't':
       do_track = YES;
       break;
-    case 'v': 
+    case 'v':
       printf("GNUnet v%s, gnunet-directory v%s\n",
-            VERSION, 
+            VERSION,
             AFS_VERSION);
       return SYSERR;
     default:
@@ -183,7 +183,7 @@
   return OK;
 }
 
-int main(int argc, 
+int main(int argc,
         char * argv[]) {
   int i;
   if (SYSERR == initUtil(argc, argv, &parseCommandLine))
@@ -200,7 +200,7 @@
 
   for (i=0;i<filenamescnt;i++)
     printDirectory(filenames[i]);
- 
+
   doneUtil();
   return 0;
 }

Modified: GNUnet/src/applications/fs/tools/gnunet-download.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-download.c  2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/tools/gnunet-download.c  2005-03-20 23:54:53 UTC 
(rev 464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/fs/tools/gnunet-download.c 
+ * @file applications/fs/tools/gnunet-download.c
  * @brief Main function to download files from GNUnet.
  * @author Christian Grothoff
  */
@@ -61,31 +61,31 @@
  */
 static int parseOptions(int argc,
                        char ** argv) {
-  int c;  
+  int c;
 
   while (1) {
     int option_index = 0;
     static struct GNoption long_options[] = {
       LONG_DEFAULT_OPTIONS,
-      { "anonymity", 1, 0, 'a' }, 
+      { "anonymity", 1, 0, 'a' },
       { "output",    1, 0, 'o' },
       { "recursive", 0, 0, 'R' },
       { "verbose",   0, 0, 'V' },
       { 0,0,0,0 }
-    };    
+    };
     c = GNgetopt_long(argc,
-                     argv, 
-                     "a:cdh:H:L:o:RvV", 
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     argv,
+                     "a:cdh:H:L:o:RvV",
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
     switch(c) {
     case 'a': {
       unsigned int receivePolicy;
-      
+
       if (1 != sscanf(GNoptarg, "%ud", &receivePolicy)) {
         LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
@@ -97,20 +97,20 @@
                          receivePolicy);
       break;
     }
-    case 'h': 
-      printhelp(); 
+    case 'h':
+      printhelp();
       return SYSERR;
     case 'o':
       FREENONNULL(setConfigurationString("GNUNET-DOWNLOAD",
                                         "FILENAME",
                                         GNoptarg));
       break;
-    case 'R': 
+    case 'R':
       FREENONNULL(setConfigurationString("GNUNET-DOWNLOAD",
                                         "RECURSIVE",
                                         "YES"));
       break;
-    case 'v': 
+    case 'v':
       printf("GNUnet v%s, gnunet-download v%s\n",
             VERSION,
             AFS_VERSION);
@@ -120,14 +120,14 @@
                                         "VERBOSE",
                                         "YES"));
       break;
-    default: 
+    default:
       LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
       return SYSERR;
     } /* end of parsing commandline */
   } /* while (1) */
   if (argc - GNoptind != 1) {
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("Not enough arguments. "
          "You must specify a GNUnet file URI\n"));
     printhelp();
@@ -156,8 +156,8 @@
       printf(_("Download at %16llu out of %16llu bytes (%8.3f kbps)"),
             event->data.DownloadProgress.completed,
             event->data.DownloadProgress.total,
-            (event->data.DownloadProgress.completed/1024.0) / 
-            (((double)(cronTime(NULL)-(event->data.DownloadProgress.start_time 
- 1))) 
+            (event->data.DownloadProgress.completed/1024.0) /
+            (((double)(cronTime(NULL)-(event->data.DownloadProgress.start_time 
- 1)))
              / (double)cronSECONDS) );
       printf("\r");
     }
@@ -171,8 +171,8 @@
   case download_complete:
     printf(_("\nDownload of file '%s' comlete.  Speed was %8.3f kilobyte per 
second.\n"),
           event->data.DownloadProgress.filename,
-          (event->data.DownloadProgress.completed/1024.0) / 
-          (((double)(cronTime(NULL)-(event->data.DownloadProgress.start_time - 
1))) 
+          (event->data.DownloadProgress.completed/1024.0) /
+          (((double)(cronTime(NULL)-(event->data.DownloadProgress.start_time - 
1)))
            / (double)cronSECONDS) );
     if (event->data.DownloadProgress.completed
        == event->data.DownloadProgress.total) {
@@ -192,8 +192,8 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return return value from download file: 0: ok, -1, 1: error
- */   
-int main(int argc, 
+ */
+int main(int argc,
         char ** argv) {
   struct ECRS_URI * uri;
   char * fstring;
@@ -222,8 +222,8 @@
   filename = getConfigurationString("GNUNET-DOWNLOAD",
                                    "FILENAME");
   if (filename == NULL) {
-    GNUNET_ASSERT(strlen(fstring) > 
-                 strlen(ECRS_URI_PREFIX) + 
+    GNUNET_ASSERT(strlen(fstring) >
+                 strlen(ECRS_URI_PREFIX) +
                  strlen(ECRS_FILE_INFIX));
     filename = expandFileName(&fstring[strlen(ECRS_URI_PREFIX)+
                                       strlen(ECRS_FILE_INFIX)]);
@@ -253,7 +253,7 @@
                                                "ANONYMITY-RECEIVE"),
                            uri,
                            filename);
-  if (OK == ok) 
+  if (OK == ok)
     SEMAPHORE_DOWN(signalFinished);
   FSUI_stop(ctx);
   SEMAPHORE_FREE(signalFinished);
@@ -271,9 +271,9 @@
   FREE(filename);
   ECRS_freeUri(uri);
 
-  stopCron(); 
+  stopCron();
   doneUtil();
-  
+
   if (ok == OK)
     return 0;
   else

Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c    2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c    2005-03-20 23:54:53 UTC 
(rev 464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/fs/tools/gnunet-insert.c 
+ * @file applications/fs/tools/gnunet-insert.c
  * @brief Tool to insert or index files into GNUnet's FS.
  * @author Christian Grothoff
  * @author Krista Bennett
@@ -33,7 +33,7 @@
 /* hmm. Man says time.h, but that doesn't yield the
    prototype.  Strange... */
 extern char *strptime(const char *s,
-                     const char *format, 
+                     const char *format,
                      struct tm *tm);
 
 static Semaphore * exitSignal;
@@ -86,7 +86,7 @@
   nid = getConfigurationString("GNUNET-INSERT",
                               "NEXTHASH");
   if (nid != NULL)
-    enc2hash(nid, &nextId);   
+    enc2hash(nid, &nextId);
   updateInterval = getConfigurationInt("GNUNET-INSERT",
                                       "INTERVAL");
 
@@ -119,7 +119,7 @@
                        const FSUI_Event * event) {
   unsigned long long delta;
   char * fstring;
-      
+
   switch(event->type) {
   case upload_progress:
     if (*verboselevel == YES) {
@@ -128,7 +128,7 @@
       _("%16llu of %16llu bytes inserted (estimating %llu seconds to 
completion)                "),
             event->data.UploadProgress.main_completed,
             event->data.UploadProgress.main_total,
-            delta / cronSECONDS);      
+            delta / cronSECONDS);
       printf("\r");
     }
     break;
@@ -148,7 +148,7 @@
     printf(_("File '%s' has URI: %s\n"),
           event->data.UploadComplete.filename,
           fstring);
-    FREE(fstring);   
+    FREE(fstring);
     if (0 == strcmp(event->data.UploadComplete.main_filename,
                    event->data.UploadComplete.filename)) {
       postProcess(event->data.UploadComplete.uri);
@@ -192,7 +192,7 @@
                   " (this option can be specified multiple times)") },
     { 'K', "global-key", "KEYWORD",
       gettext_noop("add an additional keyword for all files and directories"
-                  " (this option can be specified multiple times)") },   
+                  " (this option can be specified multiple times)") },
     HELP_LOGLEVEL,
     { 'm', "meta", "TYPE:VALUE",
       gettext_noop("set the meta-data for the given TYPE to the given VALUE") 
},
@@ -241,7 +241,7 @@
     int option_index=0;
     static struct GNoption long_options[] = {
       LONG_DEFAULT_OPTIONS,
-      { "anonymity",     1, 0, 'a' }, 
+      { "anonymity",     1, 0, 'a' },
       { "copy",          0, 0, 'C' },
       { "extract",       0, 0, 'e' },
       { "interval",      1, 0, 'i' },
@@ -259,13 +259,13 @@
       { "update",        1, 0, 'u' },
       { "verbose",       0, 0, 'V' },
       { 0,0,0,0 }
-    };    
+    };
     c = GNgetopt_long(argc,
-                     argv, 
-                     "a:c:CdehH:i:L:k:K:m:nN:p:P:RSt:T:u:vV", 
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     argv,
+                     "a:c:CdehH:i:L:k:K:m:nN:p:P:RSt:T:u:vV",
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
@@ -274,7 +274,7 @@
       unsigned int receivePolicy;
 
       if (1 != sscanf(GNoptarg,
-                     "%ud", 
+                     "%ud",
                      &receivePolicy)) {
         LOG(LOG_FAILURE,
          _("You must pass a number to the '%s' option.\n"),
@@ -291,11 +291,11 @@
                                         "DISABLE-SYMLINKING",
                                         "YES"));
       break;
-    case 'e': 
+    case 'e':
       printAndReturn = YES;
       break;
-    case 'h': 
-      printhelp(); 
+    case 'h':
+      printhelp();
       return SYSERR;
     case 'i': {
       unsigned int interval;
@@ -308,8 +308,8 @@
        setConfigurationInt("GNUNET-INSERT",
                            "INTERVAL",
                            interval);
-      break;    
-    }      
+      break;
+    }
     case 'k':
       GROW(topKeywords,
           topKeywordCnt,
@@ -324,7 +324,7 @@
       GROW(gloKeywords,
           gloKeywordCnt,
           gloKeywordCnt+1);
-      gloKeywords[gloKeywordCnt-1] 
+      gloKeywords[gloKeywordCnt-1]
        = convertToUtf8(GNoptarg,
                        strlen(GNoptarg),
         nl_langinfo(CODESET)
@@ -337,7 +337,7 @@
       tmp = convertToUtf8(GNoptarg,
                          strlen(GNoptarg),
       nl_langinfo(CODESET)
-      );     
+      );
       type = EXTRACTOR_getHighestKeywordTypeNumber();
       while (type > 0) {
        type--;
@@ -374,9 +374,9 @@
     case 'N': {
       EncName enc;
       HashCode512 nextId;
-      
+
       if (enc2hash(GNoptarg,
-                  &nextId) == SYSERR) 
+                  &nextId) == SYSERR)
        hash(GNoptarg,
             strlen(GNoptarg),
             &nextId);
@@ -388,8 +388,8 @@
     }
     case 'p': {
       unsigned int contentPriority;
-      
-      if (1 != sscanf(GNoptarg, 
+
+      if (1 != sscanf(GNoptarg,
                      "%ud",
                      &contentPriority)) {
        LOG(LOG_FAILURE,
@@ -420,9 +420,9 @@
     case 't': {
       EncName enc;
       HashCode512 thisId;
-      
+
       if (enc2hash(GNoptarg,
-                  &thisId) == SYSERR) 
+                  &thisId) == SYSERR)
        hash(GNoptarg,
             strlen(GNoptarg),
             &thisId);
@@ -440,9 +440,9 @@
     case 'u': {
       EncName enc;
       HashCode512 nextId;
-      
+
       if (enc2hash(GNoptarg,
-                  &nextId) == SYSERR) 
+                  &nextId) == SYSERR)
        hash(GNoptarg,
             strlen(GNoptarg),
             &nextId);
@@ -457,12 +457,12 @@
                                         "VERBOSE",
                                         "YES"));
       break;
-    case 'v': 
+    case 'v':
       printf("GNUnet v%s, gnunet-insert v%s\n",
-            VERSION, 
+            VERSION,
             AFS_VERSION);
       return SYSERR;
-    default: 
+    default:
       LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
       return SYSERR;
@@ -486,7 +486,7 @@
       l = EXTRACTOR_loadConfigLibraries(NULL,
                                        ex);
     for (c=GNoptind;c<argc;c++) {
-      EXTRACTOR_KeywordList * list 
+      EXTRACTOR_KeywordList * list
        = EXTRACTOR_getKeywords(l, argv[c]);
       printf(_("Keywords for file '%s':\n"),
             argv[c]);
@@ -517,7 +517,7 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return return 0 for ok, -1 on error
- */   
+ */
 int main(int argc, char ** argv) {
   int i;
   char * pname;
@@ -528,7 +528,7 @@
   int doIndex;
   int ret;
   char * extractors;
-  
+
   meta = ECRS_createMetaData();
   if (SYSERR == initUtil(argc, argv, &parseOptions)) {
     ECRS_freeMetaData(meta);
@@ -556,7 +556,7 @@
                                     "INSERTTIME");
     if (timestr != NULL) {
       struct tm t;
-      if ((NULL == strptime(timestr, 
+      if ((NULL == strptime(timestr,
                            nl_langinfo(D_T_FMT),
                            &t))) {
        LOG_STRERROR(LOG_FATAL, "strptime");
@@ -565,7 +565,7 @@
           );
       }
       FREE(timestr);
-    }    
+    }
   } else { /* ordinary insertion checks */
     if (NULL != getConfigurationString("GNUNET-INSERT",
                                       "NEXTHASH"))
@@ -596,11 +596,11 @@
                   NO,
                   (FSUI_EventCallback) &printstatus,
                   &verbose);
- 
+
   /* first insert all of the top-level files or directories */
   tmp = getConfigurationString("GNUNET-INSERT",
                               "MAIN-FILE");
-  filename = expandFileName(tmp);  
+  filename = expandFileName(tmp);
   FREE(tmp);
   if (testConfigurationString("GNUNET-INSERT",
                              "INDEX-CONTENT",
@@ -641,19 +641,19 @@
   /* wait for completion */
   SEMAPHORE_DOWN(exitSignal);
   SEMAPHORE_FREE(exitSignal);
-  
+
   /* shutdown */
   FREE(filename);
-  for (i=0;i<topKeywordCnt;i++) 
+  for (i=0;i<topKeywordCnt;i++)
     FREE(topKeywords[i]);
   GROW(topKeywords, topKeywordCnt, 0);
-  for (i=0;i<gloKeywordCnt;i++) 
+  for (i=0;i<gloKeywordCnt;i++)
     FREE(gloKeywords[i]);
   GROW(gloKeywords, gloKeywordCnt, 0);
   ECRS_freeMetaData(meta);
   FSUI_stop(ctx);
   doneUtil();
   return errorCode;
-}  
+}
 
 /* end of gnunet-insert.c */

Modified: GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2005-03-20 23:54:53 UTC 
(rev 464)
@@ -67,9 +67,9 @@
 }
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parser(int argc, 
+static int parser(int argc,
           char * argv[]) {
   int c;
 
@@ -82,24 +82,24 @@
       { "delete", 1, 0, 'D' },
       { "end", 0, 0, 'E' },
       { "keyword", 1, 0, 'k' },
-      { "mimetype", 1, 0, 'm' },     
+      { "mimetype", 1, 0, 'm' },
       { "no-advertisement", 0, 0, 'n' },
       { "quiet", 0, 0, 'q' },
-      { "realname", 1, 0, 'r' }, 
+      { "realname", 1, 0, 'r' },
       { "root", 1, 0, 'R' },
       { "set-rating", 1, 0, 's' },
       { "text", 1, 0, 't' },
       { "uri", 1, 0, 'u' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
-                     "ac:C:D:Ehk:L:m:nqr:R:s:t:u:v", 
-                     long_options, 
+                     argv,
+                     "ac:C:D:Ehk:L:m:nqr:R:s:t:u:v",
+                     long_options,
                      &option_index);
-    
-    if (c == -1) 
+
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
@@ -130,7 +130,7 @@
                                         "KEYWORD",
                                         GNoptarg));
       break;
-    case 'h': 
+    case 'h':
       printhelp();
       return SYSERR;
     case 'm':
@@ -142,7 +142,7 @@
       FREENONNULL(setConfigurationString("PSEUDONYM",
                                         "NO-ADVERTISEMENT",
                                         "YES"));
-      break;      
+      break;
     case 'q':
       FREENONNULL(setConfigurationString("PSEUDONYM",
                                         "QUIET",
@@ -188,14 +188,14 @@
             VERSION);
       return SYSERR;
     default:
-      LOG(LOG_FAILURE, 
+      LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
       return SYSERR;
     } /* end of parsing commandline */
   }
   if (GNoptind < argc) {
     while (GNoptind < argc)
-      LOG(LOG_WARNING, 
+      LOG(LOG_WARNING,
          _("Invalid argument: '%s'\n"), argv[GNoptind++]);
     LOG(LOG_FATAL,
        _("Invalid arguments. Exiting.\n"));
@@ -220,7 +220,7 @@
 }
 
 static void printMeta(const struct ECRS_MetaData * meta) {
-  ECRS_getMetaData(meta, 
+  ECRS_getMetaData(meta,
                   &itemPrinter,
                   NULL);
 }
@@ -249,14 +249,14 @@
           rating);
   printMeta(md);
 
-  if (set != NULL) {    
+  if (set != NULL) {
     int delta;
 
-    delta = 0;    
+    delta = 0;
     cpos = 0;
     while ( (set[cpos] != '\0') &&
            (set[cpos] != ':') )
-      cpos++;    
+      cpos++;
     if ( ( ( ( (strlen((char*)&enc)+1 == cpos) &&
               (0 == strncmp(set,
                             (char*)&enc,
@@ -269,14 +269,14 @@
         (set[cpos] == ':') ) {
       delta = strtol(&set[cpos+1],
                     NULL, /* no error handling yet */
-                    10);             
+                    10);       
     }
-    
+
     if (delta != 0) {
       rating = FSUI_rankNamespace(ctx,
                                  namespaceName,
                                  delta);
-      printf(_("\tRating (after update): %d\n"), 
+      printf(_("\tRating (after update): %d\n"),
             rating);
     }
   }
@@ -458,9 +458,9 @@
                            NO,
                            &namespacePrinter,
                            NULL);
-  if (cnt == -1) 
-    printf(_("Could not access namespace information.\n"));  
- 
+  if (cnt == -1)
+    printf(_("Could not access namespace information.\n"));
+
   FSUI_stop(ctx);
   doneUtil();
   return success;

Modified: GNUnet/src/applications/fs/tools/gnunet-search.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-search.c    2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/fs/tools/gnunet-search.c    2005-03-20 23:54:53 UTC 
(rev 464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/fs/tools/gnunet-search.c 
+ * @file applications/fs/tools/gnunet-search.c
  * @brief Main function to search for files on GNUnet.
  * @author Christian Grothoff
  */
@@ -45,7 +45,7 @@
 }
 
 static void printMeta(const struct ECRS_MetaData * meta) {
-  ECRS_getMetaData(meta, 
+  ECRS_getMetaData(meta,
                   &itemPrinter,
                   NULL);
 }
@@ -60,7 +60,7 @@
 
   if (event->type != search_result)
     return;
-  
+
   /* retain URIs for possible directory dump later */
   GROW(sc->fis,
        sc->fiCount,
@@ -68,14 +68,14 @@
   sc->fis[sc->fiCount-1].uri
     = ECRS_dupUri(event->data.SearchResult.fi.uri);
   sc->fis[sc->fiCount-1].meta
-    = ECRS_dupMetaData(event->data.SearchResult.fi.meta);  
+    = ECRS_dupMetaData(event->data.SearchResult.fi.meta);
 
   uri = ECRS_uriToString(event->data.SearchResult.fi.uri);
   printf("%s:\n",
         uri);
   filename = ECRS_getFromMetaData(event->data.SearchResult.fi.meta,
                                  EXTRACTOR_FILENAME);
-  if (filename != NULL) 
+  if (filename != NULL)
     printf("gnunet-download -o \"%s\" %s\n",
           filename,
           uri);
@@ -124,24 +124,24 @@
  */
 static int parseOptions(int argc,
                        char ** argv) {
-  int c;  
+  int c;
 
   while (1) {
     int option_index = 0;
     static struct GNoption long_options[] = {
       LONG_DEFAULT_OPTIONS,
-      { "anonymity", 1, 0, 'a' }, 
+      { "anonymity", 1, 0, 'a' },
       { "max",       1, 0, 'm' },
       { "output",    1, 0, 'o' },
       { "timeout",   1, 0, 't' },
       { 0,0,0,0 }
-    };    
+    };
     c = GNgetopt_long(argc,
-                     argv, 
-                     "a:c:dhH:L:m:o:t:v", 
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     argv,
+                     "a:c:dhH:L:m:o:t:v",
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
@@ -150,7 +150,7 @@
       unsigned int receivePolicy;
 
       if (1 != sscanf(GNoptarg,
-                     "%ud", 
+                     "%ud",
                      &receivePolicy)) {
         LOG(LOG_FAILURE,
          _("You must pass a number to the '%s' option.\n"),
@@ -162,13 +162,13 @@
                           receivePolicy);
       break;
     }
-    case 'h': 
-      printhelp(); 
+    case 'h':
+      printhelp();
       return SYSERR;
     case 'm': {
       unsigned int max;
       if (1 != sscanf(GNoptarg, "%ud", &max)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-m");
        return SYSERR;
@@ -176,7 +176,7 @@
        setConfigurationInt("FS",
                            "MAXRESULTS",
                            max);
-       if (max == 0) 
+       if (max == 0)
          return SYSERR; /* exit... */  
       }
       break;
@@ -189,7 +189,7 @@
     case 't': {
       unsigned int timeout;
       if (1 != sscanf(GNoptarg, "%ud", &timeout)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-t");
        return SYSERR;
@@ -200,19 +200,19 @@
       }
       break;
     }
-    case 'v': 
+    case 'v':
       printf("GNUnet v%s, gnunet-search v%s\n",
-            VERSION, 
+            VERSION,
             AFS_VERSION);
       return SYSERR;
-    default: 
+    default:
       LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
       return SYSERR;
     } /* end of parsing commandline */
   } /* while (1) */
   if (argc - GNoptind <= 0) {
-    LOG(LOG_FAILURE, 
+    LOG(LOG_FAILURE,
        _("Not enough arguments. "
          "You must specify a keyword or identifier.\n"));
     printhelp();
@@ -238,17 +238,17 @@
                                "URI");
   if (suri == NULL) {
     BREAK();
-    return SYSERR; 
+    return SYSERR;
   }
   uri = ECRS_stringToUri(suri);
   if (uri == NULL)
     uri = FSUI_parseCharKeywordURI(suri);
   FREE(suri);
-  
+
   memset(&sc, 0, sizeof(SearchClosure));
   sc.max = getConfigurationInt("FS",
                               "MAXRESULTS");
-  sc.resultCount = 0;  
+  sc.resultCount = 0;
   if (sc.max == 0)
     sc.max = (unsigned int)-1; /* infty */
   ctx = FSUI_start("gnunet-search",
@@ -262,7 +262,7 @@
   FSUI_startSearch(ctx,
                   getConfigurationInt("FS",
                                       "ANONYMITY-RECEIVE"),
-                  uri);  
+                  uri);
   wait_for_shutdown();
   FSUI_stopSearch(ctx,
                  uri);
@@ -289,14 +289,14 @@
                data,
                n,
                "600");
-      FREE(outfile);    
+      FREE(outfile);
       FREE(data);
-    } 
+    }
     FREE(prefix);
   }
   for (i=0;i<sc.fiCount;i++) {
     ECRS_freeUri(sc.fis[i].uri);
-    ECRS_freeMetaData(sc.fis[i].meta);    
+    ECRS_freeMetaData(sc.fis[i].meta);
   }
   GROW(sc.fis,
        sc.fiCount,
@@ -310,24 +310,24 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return return value from gnunet-search: 0: ok, -1: error
- */   
+ */
 int main(int argc,
         char ** argv) {
   int ret;
   char * suri;
   struct ECRS_URI * uri;
-  
+
   if (SYSERR == initUtil(argc, argv, &parseOptions))
     return 0;
 
   /* convert args to URI */
   argc = getConfigurationStringList(&argv);
   uri = NULL;
-  if (argc == 1) 
-    uri = ECRS_stringToUri(argv[0]);  
-  if (uri == NULL) 
+  if (argc == 1)
+    uri = ECRS_stringToUri(argv[0]);
+  if (uri == NULL)
     uri = FSUI_parseArgvKeywordURI(argc,
-                                  (const char**) argv);  
+                                  (const char**) argv);
   while (argc > 0)
     FREE(argv[--argc]);
   FREE(argv);
@@ -341,9 +341,9 @@
   FREENONNULL(setConfigurationString("GNUNET-SEARCH",
                                     "URI",
                                     suri));
-  FREE(suri);    
+  FREE(suri);
 
-  
+
   initializeShutdownHandlers();
   addCronJob((CronJob)&run_shutdown,
             cronSECONDS * getConfigurationInt("FS",
@@ -351,7 +351,7 @@
             0, /* no need to repeat */
             NULL);
   startCron();
-  ret = runSearch(); 
+  ret = runSearch();
   stopCron();
   delCronJob((CronJob)&run_shutdown,
             0,

Modified: GNUnet/src/applications/gap/gap.c
===================================================================
--- GNUnet/src/applications/gap/gap.c   2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/applications/gap/gap.c   2005-03-20 23:54:53 UTC (rev 464)
@@ -47,7 +47,7 @@
 /* ***************** policy constants **************** */
 
 /**
- * Until which load do we consider the peer idle and do not 
+ * Until which load do we consider the peer idle and do not
  * charge at all?
  */
 #define IDLE_LOAD_THRESHOLD 50
@@ -61,12 +61,12 @@
 #define TTL_DECREMENT 5 * cronSECONDS
 
 /**
- * Send answer if local files match 
+ * Send answer if local files match
  */
 #define QUERY_ANSWER   0x00020000
 
 /**
- * Forward the query, priority is encoded in QUERY_PRIORITY_BITMASK 
+ * Forward the query, priority is encoded in QUERY_PRIORITY_BITMASK
  */
 #define QUERY_FORWARD  0x00040000
 
@@ -76,7 +76,7 @@
 #define QUERY_INDIRECT 0x00080000
 
 /**
- * Drop the query if & with this bitmask is 0 
+ * Drop the query if & with this bitmask is 0
  */
 #define QUERY_DROPMASK (QUERY_ANSWER|QUERY_FORWARD|QUERY_INDIRECT)
 
@@ -101,7 +101,7 @@
 #define BITMAP_SIZE 16
 
 /**
- * Of how many outbound queries do we simultaneously keep track? 
+ * Of how many outbound queries do we simultaneously keep track?
  */
 #define QUERY_RECORD_COUNT 512
 
@@ -127,19 +127,19 @@
 #define BASE_REPLY_PRIORITY 4092
 
 /**
- * minimum indirection table size, defaults to 8192 entries, reduce if 
- * you have very little memory, enlarge if you start to overflow often 
+ * minimum indirection table size, defaults to 8192 entries, reduce if
+ * you have very little memory, enlarge if you start to overflow often
  * and have memory available.<p>
- *  
+ *
  * If the average query lives for say 1 minute (10 hops), and you have
  * a 56k connection (= 420 kb/minute, or approximately 8000
  * queries/minute) the maximum reasonable routing table size would
  * thus be 8192 entries.  Every entry takes about 68 bytes.<p>
- *  
+ *
  * The larger the value is that you pick here, the greater your
  * anonymity can become.  It also can improve your download speed.<p>
  *
- * Memory consumption: 
+ * Memory consumption:
  * <ul>
  * <li>8192 => 560k indirection table => approx. 6 MB gnunetd</li>
  * <li>65536 => 4456k indirection table => approx. 10 MB gnuentd</li>
@@ -153,11 +153,11 @@
 
 /**
  * Under certain cirumstances, two peers can interlock in their
- * routing such that both have a slot that is blocked exactly until 
+ * routing such that both have a slot that is blocked exactly until
  * the other peer will make that slot available.  This is the
  * probability that one will give in.  And yes, it's a hack.  It
  * may not be needed anymore once we add collision-resistance to
- * the routing hash table. 
+ * the routing hash table.
  */
 #define TIE_BREAKER_CHANCE 4
 
@@ -183,8 +183,8 @@
 
 /* **************** Types ****************** */
 
-/** 
- * Type of the results of the polciy module 
+/**
+ * Type of the results of the polciy module
  */
 typedef unsigned int QUERY_POLICY;
 
@@ -193,7 +193,7 @@
  * be determined from the header size.
  */
 typedef struct {
-  p2p_HEADER header; 
+  p2p_HEADER header;
 
   /**
    * Type of the query (block type).
@@ -201,25 +201,25 @@
   unsigned int type;
 
   /**
-   * How important is this request (network byte order) 
+   * How important is this request (network byte order)
    */
-  unsigned int priority;         
+  unsigned int priority;
 
   /**
    * Relative time to live in cronMILLIS (network byte order)
    */
-  int ttl;              
+  int ttl;
 
   /**
-   * To whom to return results? 
+   * To whom to return results?
    */
   PeerIdentity returnTo;
 
   /**
-   * Hashcodes of the file(s) we're looking for. 
+   * Hashcodes of the file(s) we're looking for.
    * Details depend on the query type.
    */
-  HashCode512 queries[1]; 
+  HashCode512 queries[1];
 
 } GAP_QUERY;
 
@@ -227,24 +227,24 @@
  * Return message for search result.
  */
 typedef struct {
-  p2p_HEADER header;   
+  p2p_HEADER header;
 
   HashCode512 primaryKey;
 
 } GAP_REPLY;
 
 /**
- * In this struct, we store information about a 
+ * In this struct, we store information about a
  * query that is being send from the local node to
- * optimize the sending strategy. 
+ * optimize the sending strategy.
  */
 typedef struct {
 
   /**
    * How often did we send this query so far?
    */
-  unsigned int sendCount;  
-  
+  unsigned int sendCount;
+
   /**
    * The message that we are sending.
    */
@@ -280,7 +280,7 @@
    * To how many peers has / will this query be transmitted?
    */
   unsigned int transmissionCount;
-  
+
   /**
    * To which peer will we never send this message?
    */
@@ -300,7 +300,7 @@
  */
 typedef struct {
   /**
-   * What are we waiting for? 
+   * What are we waiting for?
    */
   HashCode512 primaryKey;
 
@@ -310,7 +310,7 @@
   unsigned int type;
 
   /**
-   * When can we forget about this entry? 
+   * When can we forget about this entry?
    */
   cron_t ttl;
 
@@ -323,27 +323,27 @@
   unsigned int priority;
 
   /**
-   * Which replies have we already seen? 
+   * Which replies have we already seen?
    */
-  unsigned int seenIndex; 
+  unsigned int seenIndex;
 
   int seenReplyWasUnique; /* YES/NO, only valid if seenIndex == 1 */
 
   /**
    * Hashcodes of the encrypted (!) replies that we have forwarded so far
    */
-  HashCode512 * seen; 
+  HashCode512 * seen;
 
   /**
    * How many hosts are waiting for an answer to this query (length of
    * destination array)
    */
-  unsigned int hostsWaiting; 
+  unsigned int hostsWaiting;
 
   /**
-   * Who are these hosts? 
+   * Who are these hosts?
    */
-  PeerIdentity * destination; 
+  PeerIdentity * destination;
 
   /**
    * Do we currently have a response in the delay loop (delays are
@@ -451,13 +451,13 @@
 
 /**
  * The routing table. This table has entries for all
- * queries that we have recently send out. It helps 
+ * queries that we have recently send out. It helps
  * GNUnet to route the replies back to the respective
  * sender.
  */
 static IndirectionTableEntry * ROUTING_indTable_;
 
-/** 
+/**
  * Size of the indirection table specified in gnunet.conf
  */
 static unsigned int indirectionTableSize;
@@ -497,9 +497,9 @@
  */
 static int adjustTTL(int ttl, unsigned int prio) {
   if ( (ttl > 0) &&
-       (ttl > (int)(prio+3)*TTL_DECREMENT) ) 
+       (ttl > (int)(prio+3)*TTL_DECREMENT) )
     ttl = (int) (prio+3)*TTL_DECREMENT; /* bound! */
-  return ttl; 
+  return ttl;
 }
 
 /**
@@ -509,19 +509,19 @@
  *
  * @param sender the host sending us the query
  * @param priority the priority the query had when it came in,
- *        may be an arbitrary number if the 
+ *        may be an arbitrary number if the
  *        sender is malicious! Cap by trustlevel first!
  *        Set to the resulting priority.
  * @return binary encoding: QUERY_XXXX constants
  */
-static QUERY_POLICY 
-evaluateQuery(const PeerIdentity * sender, 
+static QUERY_POLICY
+evaluateQuery(const PeerIdentity * sender,
              unsigned int * priority) {
   unsigned int netLoad = getNetworkLoadUp();
 
   if ( (netLoad == (unsigned int) -1) ||
        (netLoad < IDLE_LOAD_THRESHOLD) ) {
-    *priority = 0; /* minimum priority, no charge! */ 
+    *priority = 0; /* minimum priority, no charge! */
     return QUERY_ANSWER | QUERY_FORWARD | QUERY_INDIRECT;
   }
   /* charge! */
@@ -602,7 +602,7 @@
        continue;
       }
     }
-    /* if we have no counts for a peer anymore, 
+    /* if we have no counts for a peer anymore,
        free pos entry */
     if (pos->responseList == NULL) {
       if (prev == NULL)
@@ -614,7 +614,7 @@
        pos = rtdList;
       else
        pos = prev->next;
-      continue;     
+      continue;
     }
     prev = pos;
     pos = pos->next;
@@ -626,7 +626,7 @@
  * We received a reply from 'responder' to a query received from
  * 'origin'.  Update reply track data!
  *
- * @param origin 
+ * @param origin
  * @param responder peer that send the reply
  */
 static void updateResponseData(const PeerIdentity * origin,
@@ -699,7 +699,7 @@
  * @return the number of bytes written to
  *   that buffer (must be a positive number).
  */
-static unsigned int 
+static unsigned int
 fillInQuery(const PeerIdentity * receiver,
            void * position,
            unsigned int padding) {
@@ -766,8 +766,8 @@
       else
        ranking = 0x7FFFFFF;
     }
-  }    
-  distance 
+  }
+  distance
     = distanceHashCode512(&qr->msg->queries[0],
                          &id->hashPubKey);
   if (distance <= 0)
@@ -789,7 +789,7 @@
   if (getBit(qr, getIndex(id)) == 1) {
     coreAPI->unicast(id,
                     &qr->msg->header,
-                    BASE_QUERY_PRIORITY 
+                    BASE_QUERY_PRIORITY
                     * ntohl(qr->msg->priority) * 2,
                     TTL_DECREMENT);
   }
@@ -809,17 +809,17 @@
   int oldestIndex;
   int i;
   int noclear = NO;
-  
+
   cronTime(&now);
   MUTEX_LOCK(lock);
-  
+
   oldestIndex = -1;
   expirationTime = now + ntohl(msg->ttl);
   oldestTime = expirationTime;
   for (i=0;i<QUERY_RECORD_COUNT;i++) {
     if (queries[i].expires < oldestTime) {
-      oldestTime = queries[i].expires;      
-      oldestIndex = i;      
+      oldestTime = queries[i].expires;
+      oldestIndex = i;
     }
     if (queries[i].msg == NULL)
       continue;
@@ -831,7 +831,7 @@
                      + sizeof(HashCode512))) ) {
       /* We have exactly this query pending already.
         Replace existing query! */
-      oldestIndex = i;     
+      oldestIndex = i;
       if ( (queries[i].expires > now - 4 * TTL_DECREMENT) && /* not long 
expired */
           (randomi(4) != 0) ) {
        /* do not clear the bitmap describing which peers we have
@@ -840,7 +840,7 @@
           retransmitted lots (this can happen if this is the only
           query; we may forward it to all connected peers and get no
           reply.  If the initiator keeps retrying, we want to
-          eventually forward it again. 
+          eventually forward it again.
 
           Note that the initial probability here (0.6.0/0.6.1) was
           very low (1:64), which is far too low considering that the
@@ -852,19 +852,19 @@
           a query stays in the QM indefinitely might be much more
            rare; so don't just trust a micro-scale benchmark when
            trying to figure out an 'optimal' threshold). */
-       noclear = YES; 
+       noclear = YES;
       }
-      break; /* this is it, do not scan for other 
+      break; /* this is it, do not scan for other
                'oldest' entries */
     }
   }
-  if (oldestIndex == -1) {                                 
-    qr = &dummy;  
+  if (oldestIndex == -1) {                             
+    qr = &dummy;
   } else {
     qr = &queries[oldestIndex];
     FREENONNULL(qr->msg);
     qr->msg = NULL;
-  } 
+  }
   qr->expires = expirationTime;
   qr->transmissionCount = 0;
   qr->msg = MALLOC(ntohs(msg->header.size));
@@ -886,13 +886,13 @@
     qr->activeConnections
       = coreAPI->forAllConnectedNodes
       ((PerNodeCallback)&hotpathSelectionCode,
-       qr);    
+       qr);
     /* actual selection, proportional to rankings
-       assigned by hotpathSelectionCode ... */    
+       assigned by hotpathSelectionCode ... */
     rankingSum = 0;
     for (i=0;i<8*BITMAP_SIZE;i++)
       rankingSum += qr->rankings[i];
-    if ( (rankingSum != 0) && 
+    if ( (rankingSum != 0) &&
         (qr->activeConnections > 0) ) {
       /* select 4 peers for forwarding */
       for (i=0;i<4;i++) {
@@ -906,7 +906,7 @@
            setBit(qr, j);
            break;
          }
-       }  
+       }
       }
     } else {
       /* no bias available, go random! */
@@ -914,7 +914,7 @@
        for (i=4*BITMAP_SIZE*8/qr->activeConnections-1;i>=0;i--)
          setBit(qr, randomi(BITMAP_SIZE)*8); /* select 4 random nodes */
       }        
-    }    
+    }
     FREE(qr->rankings);
     qr->rankings = NULL;
     /* now forward to a couple of selected nodes */
@@ -946,9 +946,9 @@
        qr->expires = 0; /* expire NOW! */
        ret = OK;
        break;
-      }    
+      }
     }
-  }  
+  }
   MUTEX_UNLOCK(lock);
   return ret;
 }
@@ -959,8 +959,8 @@
  * Compute the hashtable index of a host id.
  */
 static unsigned int computeRoutingIndex(const HashCode512 * query) {
-  unsigned int res 
-    = (((unsigned int*)query)[0] + 
+  unsigned int res
+    = (((unsigned int*)query)[0] +
        ((unsigned int*)query)[1] * random_qsel)
     % indirectionTableSize;
   GNUNET_ASSERT(res < indirectionTableSize);
@@ -988,7 +988,7 @@
  * Queue a reply with cron to simulate
  * another peer returning the response with
  * some latency (and then route as usual).
- * 
+ *
  * @param sender the next hop
  * @param result the content that was found
  */
@@ -1014,13 +1014,13 @@
   if (size >= MAX_BUFFER_SIZE) {
     BREAK();
     return;
-  }    
+  }
   pmsg = MALLOC(size);
-  pmsg->header.size 
+  pmsg->header.size
     = htons(size);
-  pmsg->header.type 
+  pmsg->header.type
     = htons(GAP_p2p_PROTO_RESULT);
-  pmsg->primaryKey 
+  pmsg->primaryKey
     = *primaryKey;
   memcpy(&pmsg[1],
         &data[1],
@@ -1028,7 +1028,7 @@
   /* delay reply, delay longer if we are busy (makes it harder
      to predict / analyze, too). */
   addCronJob((CronJob)&useContentLater,
-            randomi(TTL_DECREMENT), 
+            randomi(TTL_DECREMENT),
             0,
             pmsg);
 }
@@ -1039,7 +1039,7 @@
     return;
   MUTEX_LOCK(lock);
   rewards[rewardPos].query = *query;
-  rewards[rewardPos].prio = prio;  
+  rewards[rewardPos].prio = prio;
   rewardPos++;
   if (rewardPos == rewardSize)
     rewardPos = 0;
@@ -1100,7 +1100,7 @@
       ite->priority += priority;
       for (i=0;i<ite->hostsWaiting;i++)
        if (equalsHashCode512(&ite->destination[i].hashPubKey,
-                             &sender->hashPubKey)) 
+                             &sender->hashPubKey))
          return SYSERR;
     } else {
       ite->successful_local_lookup_in_delay_loop = NO;
@@ -1111,18 +1111,18 @@
           ite->hostsWaiting,
           0);
       ite->ttl = now + ttl;
-      ite->priority = priority;      
+      ite->priority = priority;
     }
   } else { /* GROW mode */
     GNUNET_ASSERT(equalsHashCode512(query,
                                    &ite->primaryKey));
     for (i=0;i<ite->hostsWaiting;i++)
       if (equalsHashCode512(&sender->hashPubKey,
-                           &ite->destination[i].hashPubKey)) 
-       return SYSERR; /* already there! */     
+                           &ite->destination[i].hashPubKey))
+       return SYSERR; /* already there! */
     /* extend lifetime */
     if (ite->ttl < now + ttl)
-      ite->ttl = now + ttl; 
+      ite->ttl = now + ttl;
     ite->priority += priority;
   }
   GROW(ite->destination,
@@ -1132,7 +1132,7 @@
   /* again: new listener, flush seen list */
   GROW(ite->seen,
        ite->seenIndex,
-       0); 
+       0);
   ite->seenReplyWasUnique = NO;
   return OK;
 }
@@ -1154,12 +1154,12 @@
  *
  *
  * @param query the hash to look for
- * @param ttl how long would the new query last 
+ * @param ttl how long would the new query last
  * @param priority the priority of the query
  * @param sender which peer transmitted the query?
- * @param isRouted set to OK if we can route this 
+ * @param isRouted set to OK if we can route this
  *        query, SYSERR if we can not
- * @param doForward is set to OK if we should 
+ * @param doForward is set to OK if we should
  *        forward the query, SYSERR if not
  * @return a case ID for debugging
  */
@@ -1180,28 +1180,28 @@
     addToSlot(ITE_REPLACE, ite, query, ttl, priority, sender);
     *isRouted = YES;
     *doForward = YES;
-    return 21; 
+    return 21;
   }
   if ( ( ttl < 0) &&
        (equalsHashCode512(query,
                          &ite->primaryKey) ) ) {
     /* if ttl is "expired" and we have
-       the exact query pending, route 
+       the exact query pending, route
        replies but do NOT forward _again_! */
     addToSlot(ITE_GROW, ite, query, ttl, priority, sender);
-    *isRouted = NO; 
+    *isRouted = NO;
     /* don't go again, we are not even going to reset the seen
        list, so why bother looking locally again, if we would find
        something, the seen list would block sending the reply anyway
        since we're not resetting that (ttl too small!)! */
     *doForward = NO;
-    return 0; 
+    return 0;
   }
- 
-  if ( (ite->ttl + (TTL_DECREMENT * topology->estimateNetworkSize()) < 
+
+  if ( (ite->ttl + (TTL_DECREMENT * topology->estimateNetworkSize()) <
        (cron_t)(now + ttl)) &&
-       (ite->ttl < now) ) { 
-    /* expired AND is significantly (!) 
+       (ite->ttl < now) ) {
+    /* expired AND is significantly (!)
        longer expired than new query */
     /* previous entry relatively expired, start using the slot --
        and kill the old seen list!*/
@@ -1213,12 +1213,12 @@
                           &ite->primaryKey) &&
         (YES == ite-> successful_local_lookup_in_delay_loop) ) {
       *isRouted = NO;
-      *doForward = NO;    
+      *doForward = NO;
       addToSlot(ITE_GROW, ite, query, ttl, priority, sender);
       return 1;
     } else {
       *isRouted = YES;
-      *doForward = YES;    
+      *doForward = YES;
       addToSlot(ITE_REPLACE, ite, query, ttl, priority, sender);
       return 2;
     }
@@ -1226,7 +1226,7 @@
   if (equalsHashCode512(query,
                        &ite->primaryKey) ) {
     if (ite->seenIndex == 0) {
-      if (ite->ttl + TTL_DECREMENT < (cron_t)(now + ttl)) { 
+      if (ite->ttl + TTL_DECREMENT < (cron_t)(now + ttl)) {
        /* ttl of new is SIGNIFICANTLY longer? */
        /* query again */
        addToSlot(ITE_REPLACE, ite, query, ttl, priority, sender);
@@ -1245,8 +1245,8 @@
           just wait for the reply that may come back */
        if (OK == addToSlot(ITE_GROW, ite, query, ttl, priority, sender)) {
          if (YES == ite->successful_local_lookup_in_delay_loop) {
-           *isRouted = NO; 
-           /* don't go again, we are already processing a 
+           *isRouted = NO;
+           /* don't go again, we are already processing a
               local lookup! */
            *doForward = NO;
            return 5;
@@ -1262,7 +1262,7 @@
          *doForward = NO;
          return 7;
        }
-      }      
+      }
     }
     /* ok, we've seen at least one reply before, replace
        more agressively */
@@ -1277,14 +1277,14 @@
        ite->seenReplyWasUnique = NO;
        addToSlot(ITE_REPLACE, ite, query, ttl, priority, sender);
        if (YES == ite->successful_local_lookup_in_delay_loop) {
-         *isRouted = NO; 
+         *isRouted = NO;
          /* don't go again, we are already processing a local lookup! */
          *doForward = NO;
          return 8;
        } else {
-         *isRouted = YES; 
+         *isRouted = YES;
          /* only forward if new TTL is significantly higher */
-         if (ite->ttl + TTL_DECREMENT < (cron_t)(now + ttl)) 
+         if (ite->ttl + TTL_DECREMENT < (cron_t)(now + ttl))
            *doForward = YES;
          else
            *doForward = NO;
@@ -1299,18 +1299,18 @@
            *doForward = NO;
            return 10;
          } else {
-           *isRouted = YES; 
+           *isRouted = YES;
            *doForward = NO;
            return 11;
          }
        } else {
-         *isRouted = NO; 
+         *isRouted = NO;
          *doForward = NO;
          return 12;
        }
       }
     } else { /* KSK or SKS, multiple results possible! */
-      /* It's a pending KSK or SKS that can have multiple 
+      /* It's a pending KSK or SKS that can have multiple
         replies.  Do not re-send, just forward the
         answers that we get from now on to this additional
         receiver */
@@ -1324,7 +1324,7 @@
        *doForward = NO;
        return 13;
       } else {
-       *isRouted = isttlHigher; 
+       *isRouted = isttlHigher;
        /* receiver is the same as the one that already got the
           answer, do not bother to do this again, IF
           the TTL is not higher! */
@@ -1332,21 +1332,21 @@
        return 14;
       }
     }
-  } 
+  }
   /* a different query that is expired a bit longer is using
      the slot; but if it is a query that has received
-     a unique response already, we can eagerly throw it out 
-     anyway, since the request has been satisfied 
+     a unique response already, we can eagerly throw it out
+     anyway, since the request has been satisfied
      completely */
   if ( (ite->ttl + TTL_DECREMENT < (cron_t)(now + ttl) ) &&
-       (ite->ttl < now) && 
+       (ite->ttl < now) &&
        (ite->seenReplyWasUnique) ) {
     /* we have seen the unique answer, get rid of it early */
     addToSlot(ITE_REPLACE, ite, query, ttl, priority, sender);
     *isRouted = YES;
     *doForward = YES;
     return 15;
-  }   
+  }
   /* Another still valid query is using the slot.  Now we need a _really_
      good reason to discard it... */
   if (ttl < 0) {
@@ -1365,20 +1365,20 @@
      replaces query B which replaces query A which could happen so
      quickly that no response to either query ever makes it through...
   */
-  if ( (long long)((ite->ttl - now) * priority) > 
+  if ( (long long)((ite->ttl - now) * priority) >
        (long long) 10 * (ttl * ite->priority) ) {
     addToSlot(ITE_REPLACE, ite, query, ttl, priority, sender);
     *isRouted = YES;
     *doForward = YES;
     return 17;
-  } 
+  }
   if (randomi(TIE_BREAKER_CHANCE) == 0) {
     addToSlot(ITE_REPLACE, ite, query, ttl, priority, sender);
     *isRouted = YES;
     *doForward = YES;
     return 20;
-  } 
-  /* sadly, the slot is busy with something else; we can 
+  }
+  /* sadly, the slot is busy with something else; we can
      not even add ourselves to the reply set */
   *isRouted = NO;
   *doForward = NO;
@@ -1387,7 +1387,7 @@
 }
 
 /**
- * Send a reply to a host.  
+ * Send a reply to a host.
  *
  * @param ite the matching slot in the indirection table
  * @param msg the message to route
@@ -1397,20 +1397,20 @@
   unsigned int j;
   unsigned int maxDelay;
   cron_t now;
-   
+
   cronTime(&now);
   if (now < ite->ttl)
     maxDelay = ite->ttl - now;
   else
     maxDelay = TTL_DECREMENT; /* for expired queries */
-  /* send to peers */  
+  /* send to peers */
   for (j=0;j<ite->hostsWaiting;j++)
     coreAPI->unicast(&ite->destination[j],
-                    msg, 
+                    msg,
                     BASE_REPLY_PRIORITY *
-                    (ite->priority+1), 
+                    (ite->priority+1),
                     /* weigh priority */
-                    maxDelay);    
+                    maxDelay);
 }
 
 struct qLRC {
@@ -1419,7 +1419,7 @@
   unsigned int valueCount;
 };
 
-static int 
+static int
 queryLocalResultCallback(const HashCode512 * primaryKey,
                         const DataContainer * value,
                         struct qLRC * cls) {
@@ -1433,7 +1433,7 @@
   hash(&value[1],
        ntohl(value->size) - sizeof(DataContainer),
        &hc);
-  for (i=0;i<ite->seenIndex;i++) 
+  for (i=0;i<ite->seenIndex;i++)
     if (equalsHashCode512(&hc,
                          &ite->seen[i]))
       return OK; /* drop, duplicate result! */
@@ -1448,20 +1448,20 @@
         ntohl(value->size));
   return OK;
 }
- 
+
 /**
- * Execute a single query. Tests if the query can be routed. If yes, 
- * the query is added to the routing table and the content is looked 
- * for locally. If the content is available locally, a deferred 
- * response is simulated with a cron job and the local content is 
- * marked as valueable. The method returns OK if the query should 
+ * Execute a single query. Tests if the query can be routed. If yes,
+ * the query is added to the routing table and the content is looked
+ * for locally. If the content is available locally, a deferred
+ * response is simulated with a cron job and the local content is
+ * marked as valueable. The method returns OK if the query should
  * subsequently be routed to other peers.
  *
  * @param sender next hop in routing of the reply, NULL for us
  * @param prio the effective priority of the query
  * @param ttl the relative ttl of the query
  * @param query the query itself
- * @return OK/YES if the query will be routed further, 
+ * @return OK/YES if the query will be routed further,
  *         NO if we already found the one and only response,
  *         SYSERR if not (out of resources)
  */
@@ -1478,9 +1478,9 @@
   int * perm;
   int doForward;
   EncName enc;
-  
+
   ite = &ROUTING_indTable_[computeRoutingIndex(&query->queries[0])];
-  MUTEX_LOCK(&ite->lookup_exclusion); 
+  MUTEX_LOCK(&ite->lookup_exclusion);
   if (sender != NULL) {
     if ((policy & QUERY_INDIRECT) > 0) {
       needsForwarding(&query->queries[0],
@@ -1488,7 +1488,7 @@
                      prio,
                      sender,
                      &isRouted,
-                     &doForward); 
+                     &doForward);
     } else {
       isRouted = NO;
       doForward = YES;
@@ -1521,7 +1521,7 @@
     bs->get(bs->closure,
            ntohl(query->type),
            prio,
-           1 + ( ntohs(query->header.size) 
+           1 + ( ntohs(query->header.size)
                  - sizeof(GAP_QUERY)) / sizeof(HashCode512),
            &query->queries[0],
            (DataProcessor) &queryLocalResultCallback,
@@ -1540,7 +1540,7 @@
     if (max > cls.valueCount)
       max = cls.valueCount; /* can't send more back then
                                what we have */
-    
+
     for (i=0;i<cls.valueCount;i++) {
       if (i < max) {
        if (cls.sender != NULL)
@@ -1548,7 +1548,7 @@
                     &query->queries[0],
                     cls.values[perm[i]]);
       }
-      /* even for local results, always do 'put' 
+      /* even for local results, always do 'put'
         (at least to give back results to local client &
         to update priority; but only do this for
         the first result */
@@ -1556,14 +1556,14 @@
              &query->queries[0],
              cls.values[perm[i]],
              ite->priority);
-      
+
       if (uri(cls.values[perm[i]],
              ntohl(cls.values[perm[i]]->size),
              ite->type,
              &query->queries[0]))
        doForward = NO; /* we have the one and only answer,
                                do not bother to forward... */
-      
+
       FREE(cls.values[perm[i]]);
     }
     FREE(perm);
@@ -1578,7 +1578,7 @@
   if (doForward)
     forwardQuery(query,
                 sender);
-  return doForward; 
+  return doForward;
 }
 
 /**
@@ -1589,10 +1589,10 @@
  * sure that we do not send the same reply back on the same route more
  * than once.
  *
- * @param hostId who sent the content? NULL 
+ * @param hostId who sent the content? NULL
  *        for locally found content.
  * @param msg the p2p reply that was received
- * @return how good this content was (effective 
+ * @return how good this content was (effective
  *         priority of the original request)
  */
 static int useContent(const PeerIdentity * hostId,
@@ -1610,7 +1610,7 @@
     BREAK();
     return SYSERR; /* invalid! */
   }
-             
+       
   ite = &ROUTING_indTable_[computeRoutingIndex(&msg->primaryKey)];
   size = ntohs(msg->header.size) - sizeof(GAP_REPLY);
   prio = 0;
@@ -1661,7 +1661,7 @@
          GROW(ite->destination,
               ite->hostsWaiting,
               ite->hostsWaiting - 1);
-       }                         
+       }                       
       }
     }
     GROW(ite->seen,
@@ -1669,7 +1669,7 @@
         ite->seenIndex+1);
     ite->seen[ite->seenIndex-1] = contentHC;
     if (ite->seenIndex == 1) {
-      ite->seenReplyWasUnique 
+      ite->seenReplyWasUnique
        = uri(&msg[1],
              size,
              ite->type,
@@ -1697,7 +1697,7 @@
          size,
          ite->type,
          &ite->primaryKey)) {
-    /* unique reply, stop forwarding! */  
+    /* unique reply, stop forwarding! */
     dequeueQuery(&ite->primaryKey);
   }
 
@@ -1708,7 +1708,7 @@
                              prio);
     for (i=0;i<ite->hostsWaiting;i++)
       updateResponseData(&ite->destination[i],
-                        hostId);    
+                        hostId);
     if (preference < CONTENT_BANDWIDTH_VALUE)
       preference = CONTENT_BANDWIDTH_VALUE;
     coreAPI->preferTrafficFrom(hostId,
@@ -1720,7 +1720,7 @@
 /* ***************** GAP API implementation ***************** */
 
 /**
- * Start GAP.  
+ * Start GAP.
  *
  * @param datastore the storage callbacks to use for storing data
  * @return SYSERR on error, OK on success
@@ -1767,7 +1767,7 @@
     BREAK();
     return SYSERR; /* too many keys! */
   }
-  
+
   /* anonymity level considerations:
      check cover traffic availability! */
   if (anonymityLevel > 0) {
@@ -1812,24 +1812,24 @@
       }
     }
   }
-  
 
+
   msg = MALLOC(size);
-  msg->header.size 
+  msg->header.size
     = htons(size);
-  msg->header.type 
+  msg->header.type
     = htons(GAP_p2p_PROTO_QUERY);
   msg->type
     = htonl(type);
-  msg->priority 
+  msg->priority
     = htonl(prio);
   msg->ttl
-    = htonl(adjustTTL((int)timeout - cronTime(NULL), 
+    = htonl(adjustTTL((int)timeout - cronTime(NULL),
                      prio));
   memcpy(&msg->queries[0],
         keys,
         sizeof(HashCode512) * keyCount);
-  msg->returnTo 
+  msg->returnTo
     = *coreAPI->myIdentity;
   ret = execQuery(NULL,
                  prio,
@@ -1876,11 +1876,11 @@
   if (size >= MAX_BUFFER_SIZE)
     return 0;
   reply = (GAP_REPLY*) position;
-  reply->header.type 
+  reply->header.type
     = htons(GAP_p2p_PROTO_RESULT);
   reply->header.size
     = htons(size);
-  reply->primaryKey 
+  reply->primaryKey
     = *primaryKey;
   memcpy(&reply[1],
         &data[1],
@@ -1905,12 +1905,12 @@
     BREAK();
     return 0;
   }
-      
-  queries = 1 + (ntohs(msg->size) - sizeof(GAP_QUERY)) 
+
+  queries = 1 + (ntohs(msg->size) - sizeof(GAP_QUERY))
     / sizeof(HashCode512);
-  if ( (queries <= 0) || 
+  if ( (queries <= 0) ||
        (ntohs(msg->size) < sizeof(GAP_QUERY)) ||
-       (ntohs(msg->size) != sizeof(GAP_QUERY) + 
+       (ntohs(msg->size) != sizeof(GAP_QUERY) +
        (queries-1) * sizeof(HashCode512)) ) {
     BREAK();
     return SYSERR; /* malformed query */
@@ -1926,8 +1926,8 @@
     FREE(qmsg);
     return OK;
   }
-      
 
+
   /* decrement ttl (always) */
   ttl = ntohl(qmsg->ttl);
   if (ttl < 0) {
@@ -1948,7 +1948,7 @@
   }
   preference = (double) prio;
   if ((policy & QUERY_INDIRECT) > 0) {
-    qmsg->returnTo 
+    qmsg->returnTo
       = *coreAPI->myIdentity;
   } else {
     /* otherwise we preserve the original sender
@@ -1961,15 +1961,15 @@
   coreAPI->preferTrafficFrom(sender,
                             preference);
   /* adjust priority */
-  qmsg->priority 
+  qmsg->priority
     = htonl(prio);
   qmsg->ttl
     = htonl(adjustTTL(ttl, prio));
-  
+
   ttl = ntohl(qmsg->ttl);
   if (ttl < 0)
     ttl = 0;
-  execQuery(sender,        
+  execQuery(sender,    
            prio,
            policy,
            ttl,
@@ -1999,9 +1999,9 @@
   else
     return (unsigned int) (tot / active);
 }
- 
 
-GAP_ServiceAPI * 
+
+GAP_ServiceAPI *
 provide_module_gap(CoreAPIForApplication * capi) {
   static GAP_ServiceAPI api;
   unsigned int i;
@@ -2026,13 +2026,13 @@
                        "TABLESIZE");
   if (indirectionTableSize < MIN_INDIRECTION_TABLE_SIZE)
     indirectionTableSize = MIN_INDIRECTION_TABLE_SIZE;
-  ROUTING_indTable_ 
+  ROUTING_indTable_
     = MALLOC(sizeof(IndirectionTableEntry)
             * indirectionTableSize);
   memset(ROUTING_indTable_,
         0,
         sizeof(IndirectionTableEntry)
-        * indirectionTableSize);        
+        * indirectionTableSize);       
   for (i=0;i<indirectionTableSize;i++) {
     ROUTING_indTable_[i].successful_local_lookup_in_delay_loop = NO;
     MUTEX_CREATE(&ROUTING_indTable_[i].lookup_exclusion);
@@ -2086,11 +2086,11 @@
 
   for (i=0;i<indirectionTableSize;i++) {
     MUTEX_DESTROY(&ROUTING_indTable_[i].lookup_exclusion);
-    GROW(ROUTING_indTable_[i].seen, 
-        ROUTING_indTable_[i].seenIndex, 
+    GROW(ROUTING_indTable_[i].seen,
+        ROUTING_indTable_[i].seenIndex,
         0);
     ROUTING_indTable_[i].seenReplyWasUnique = NO;
-    GROW(ROUTING_indTable_[i].destination, 
+    GROW(ROUTING_indTable_[i].destination,
         ROUTING_indTable_[i].hostsWaiting,
         0);
   }
@@ -2105,7 +2105,7 @@
     }
     FREE(pos);
   }
-  for (i=0;i<QUERY_RECORD_COUNT;i++) 
+  for (i=0;i<QUERY_RECORD_COUNT;i++)
     FREENONNULL(queries[i].msg);
 
   coreAPI->releaseService(identity);

Modified: GNUnet/src/applications/getoption/clientapi.c
===================================================================
--- GNUnet/src/applications/getoption/clientapi.c       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/getoption/clientapi.c       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -35,7 +35,7 @@
 /**
  * Obtain option from a peer.
  * @return NULL on error
- */   
+ */
 char * getConfigurationOptionValue(GNUNET_TCP_SOCKET * sock,
                                   const char * section,
                                   const char * option) {
@@ -43,14 +43,14 @@
   CS_GET_OPTION_REPLY * reply;
   int res;
   char * ret;
-  
+
   memset(&req,
         0,
         sizeof(CS_GET_OPTION_REQUEST));
   req.header.type = htons(CS_PROTO_GET_OPTION_REQUEST);
   req.header.size = htons(sizeof(CS_GET_OPTION_REQUEST));
   if ( (strlen(section) >= CS_GET_OPTION_REQUEST_OPT_LEN) ||
-       (strlen(option) >= CS_GET_OPTION_REQUEST_OPT_LEN) ) 
+       (strlen(option) >= CS_GET_OPTION_REQUEST_OPT_LEN) )
     return NULL;
   strcpy(&req.section[0],
         section);
@@ -58,12 +58,12 @@
         option);
   res = writeToSocket(sock,
                      &req.header);
-  if (res != OK) 
+  if (res != OK)
     return NULL;
   reply = NULL;
   res = readFromSocket(sock,
                       (CS_HEADER**)&reply);
-  if (res != OK) 
+  if (res != OK)
     return NULL;
   ret = MALLOC(ntohs(reply->header.size) - sizeof(CS_HEADER) + 1);
   memcpy(ret,

Modified: GNUnet/src/applications/getoption/getoption.h
===================================================================
--- GNUnet/src/applications/getoption/getoption.h       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/getoption/getoption.h       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -16,7 +16,7 @@
       Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       Boston, MA 02111-1307, USA.
  */
- 
+
 #ifndef GETOPTION_H
 #define GETOPTION_H
 

Modified: GNUnet/src/applications/identity/hostkey.c
===================================================================
--- GNUnet/src/applications/identity/hostkey.c  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/identity/hostkey.c  2005-03-20 23:54:53 UTC (rev 
464)
@@ -23,7 +23,7 @@
  * @brief module encapsulating our secret key for the peer
  *
  * @author Christian Grothoff
- */ 
+ */
 
 #include "platform.h"
 #include "gnunet_util.h"
@@ -54,22 +54,22 @@
   return publicKey;
 }
 
-/** 
+/**
  * Sign arbitrary data. ALWAYS use only on data we generated
- * entirely! 
+ * entirely!
  * @return SYSERR on error, OK on success
  */
 int signData(const void * data,
             unsigned short size,
             Signature * result) {
-  return sign(hostkey, 
-             size, 
-             data, 
+  return sign(hostkey,
+             size,
+             data,
              result);
 }
 
 /**
- * Decrypt a given block with the hostkey. 
+ * Decrypt a given block with the hostkey.
  *
  * @param block the data to decrypt, encoded as returned by encrypt, not 
consumed
  * @param result pointer to a location where the result can be stored
@@ -80,9 +80,9 @@
 int decryptData(const RSAEncryptedData * block,
                void * result,
                unsigned int max) {
-  return decryptPrivateKey(hostkey, 
-                          block, 
-                          result, 
+  return decryptPrivateKey(hostkey,
+                          block,
+                          result,
                           max);
 }
 
@@ -105,12 +105,12 @@
   FREE(gnHome);
   strcat(hostkeyfile, "/");
   strcat(hostkeyfile, HOSTKEYFILE);
-  res = readFile(hostkeyfile, 
-                sizeof(unsigned short), 
+  res = readFile(hostkeyfile,
+                sizeof(unsigned short),
                 &len);
   if (res == sizeof(unsigned short)) {
     encPrivateKey = (PrivateKeyEncoded*) MALLOC(ntohs(len));
-    if (ntohs(len) != 
+    if (ntohs(len) !=
        readFile(hostkeyfile,
                 ntohs(len),
                 encPrivateKey)) {
@@ -123,28 +123,28 @@
   } else
     encPrivateKey = NULL;
   if (encPrivateKey == NULL) { /* make new hostkey */
-    LOG(LOG_MESSAGE, 
+    LOG(LOG_MESSAGE,
        _("Creating new hostkey (this may take a while).\n"));
     hostkey = makePrivateKey();
     if (hostkey == NULL)
       errexit(_("Could not create hostkey!\n"));
     encPrivateKey = encodePrivateKey(hostkey);
     GNUNET_ASSERT(encPrivateKey != NULL);
-    writeFile(hostkeyfile, 
-             encPrivateKey, 
+    writeFile(hostkeyfile,
+             encPrivateKey,
              ntohs(encPrivateKey->len),
              "600");
     FREE(encPrivateKey);
-    LOG(LOG_MESSAGE, 
+    LOG(LOG_MESSAGE,
        _("Done creating hostkey.\n"));
   } else {
-    hostkey = decodePrivateKey(encPrivateKey);    
+    hostkey = decodePrivateKey(encPrivateKey);
     FREE(encPrivateKey);
   }
   FREE(hostkeyfile);
   if (hostkey != NULL) {
     publicKey = MALLOC(sizeof(PublicKey));
-    getPublicKey(hostkey, 
+    getPublicKey(hostkey,
                 publicKey);
   } else {
     publicKey = NULL;

Modified: GNUnet/src/applications/identity/hostkey.h
===================================================================
--- GNUnet/src/applications/identity/hostkey.h  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/identity/hostkey.h  2005-03-20 23:54:53 UTC (rev 
464)
@@ -23,7 +23,7 @@
  * @brief module encapsulating our secret key for the peer
  *
  * @author Christian Grothoff
- */ 
+ */
 
 #ifndef HOSTKEY_H
 #define HOSTKEY_H
@@ -36,9 +36,9 @@
  */
 const PublicKey * getPublicPrivateKey();
 
-/** 
+/**
  * Sign arbitrary data. ALWAYS use only on data we generated
- * entirely! 
+ * entirely!
  * @return SYSERR on error, OK on success
  */
 int signData(const void * data,
@@ -46,7 +46,7 @@
             Signature * result);
 
 /**
- * Decrypt a given block with the hostkey. 
+ * Decrypt a given block with the hostkey.
  * @param block the data to decrypt, encoded as returned by encrypt, not 
consumed
  * @param result pointer to a location where the result can be stored
  * @param max the maximum number of bits to store for the result, if
@@ -58,8 +58,8 @@
                unsigned int max);
 
 
- 
 
+
 void initPrivateKey();
 
 void donePrivateKey();

Modified: GNUnet/src/applications/identity/identity.c
===================================================================
--- GNUnet/src/applications/identity/identity.c 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/identity/identity.c 2005-03-20 23:54:53 UTC (rev 
464)
@@ -36,7 +36,7 @@
  *   consistently!
  *
  * @author Christian Grothoff
- */ 
+ */
 
 #include "platform.h"
 #include "gnunet_util.h"
@@ -51,7 +51,7 @@
 
 #define TRUSTDIR "data/credit/"
 
-/** 
+/**
  * Masks to keep track when the trust has changed and
  * to get the real trust value.
  */
@@ -63,23 +63,23 @@
 typedef struct {
   PeerIdentity identity;
   /**
-   *how long is this host blacklisted? (if at all) 
+   *how long is this host blacklisted? (if at all)
    */
   cron_t until;
   /**
-   * what would be the next increment for blacklisting? 
+   * what would be the next increment for blacklisting?
    */
   cron_t delta;
   /**
-   * for which protocol is this host known? 
+   * for which protocol is this host known?
    */
   unsigned short protocol;
-  /** 
-   * should we also reject incoming messages? (YES/NO) 
+  /**
+   * should we also reject incoming messages? (YES/NO)
    */
   int strict;
   /**
-   * trust rating for this peer 
+   * trust rating for this peer
    */
   unsigned int trust;
 } HostEntry;
@@ -182,9 +182,9 @@
   char * fn;
   unsigned int trust;
 
-  MUTEX_LOCK(&lock_);   
+  MUTEX_LOCK(&lock_);
   if (NULL != findHost(identity, protocol)) {
-    MUTEX_UNLOCK(&lock_);   
+    MUTEX_UNLOCK(&lock_);
     return; /* already there */
   }
   if (count_ == max_)
@@ -199,10 +199,10 @@
   hash2enc(&identity->hashPubKey,
           &fil);
   fn = MALLOC(strlen((char*)trustDirectory)+sizeof(EncName)+1);
-  buildFileName(trustDirectory, &fil, fn); 
+  buildFileName(trustDirectory, &fil, fn);
   if (sizeof(unsigned int) ==
-      readFile(fn, 
-              sizeof(unsigned int), 
+      readFile(fn,
+              sizeof(unsigned int),
               &trust)) {
     hosts_[count_].trust = ntohl(trust);
   } else {
@@ -210,18 +210,18 @@
   }
   FREE(fn);
   count_++;
-  MUTEX_UNLOCK(&lock_);   
+  MUTEX_UNLOCK(&lock_);
 }
 
 /**
- * Increase the host credit by a value. 
+ * Increase the host credit by a value.
  *
  * @param hostId is the identity of the host
  * @param value is the int value by which the host credit is to be increased or
  *        decreased
  * @returns the actual change in trust (positive or negative)
  */
-static int changeHostTrust(const PeerIdentity * hostId, 
+static int changeHostTrust(const PeerIdentity * hostId,
                           int value){
   HostEntry * host;
 
@@ -237,7 +237,7 @@
   }
   if ( ((int) (host->trust & TRUST_ACTUAL_MASK)) + value < 0) {
     value = - (host->trust & TRUST_ACTUAL_MASK);
-    host->trust = 0 | TRUST_REFRESH_MASK; /* 0 remaining */ 
+    host->trust = 0 | TRUST_REFRESH_MASK; /* 0 remaining */
   } else {
     host->trust = ( (host->trust & TRUST_ACTUAL_MASK) + value) | 
TRUST_REFRESH_MASK;
   }
@@ -247,7 +247,7 @@
 
 /**
  * Obtain the trust record of a peer.
- * 
+ *
  * @param hostId the identity of the peer
  * @return the amount of trust we currently have in that peer
  */
@@ -257,16 +257,16 @@
 
   MUTEX_LOCK(&lock_);
   host = findHost(hostId, ANY_PROTOCOL_NUMBER);
-  if (host == NULL) 
+  if (host == NULL)
     trust = 0;
-  else 
+  else
     trust = host->trust & TRUST_ACTUAL_MASK;
   MUTEX_UNLOCK(&lock_);
   return trust;
 }
 
 
-static void cronHelper(const char * filename, 
+static void cronHelper(const char * filename,
                       const char * dirname,
                       void * unused) {
   PeerIdentity identity;
@@ -280,19 +280,19 @@
                  (char*)&id,
                  &protoNumber)) {
     id.encoding[sizeof(EncName)-1] = '\0';
-    if (OK == enc2hash((char*)&id, 
+    if (OK == enc2hash((char*)&id,
                       &identity.hashPubKey)) {
       addHostToKnown(&identity,
                     (unsigned short) protoNumber);
       return;
     }
-  } 
-  
+  }
+
   fullname = MALLOC(strlen(filename) + strlen(networkIdDirectory) + 1);
   fullname[0] = '\0';
   strcat(fullname, networkIdDirectory);
   strcat(fullname, filename);
-  if (0 == UNLINK(fullname)) 
+  if (0 == UNLINK(fullname))
     LOG(LOG_WARNING,
        _("File '%s' in directory '%s' does not match naming convention. 
Removed.\n"),
        filename,
@@ -312,7 +312,7 @@
                        &cronHelper,
                        NULL);
   if (count <= 0) {
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("%s '%s' returned no known hosts!\n"),
        "scanDirectory",
        networkIdDirectory);
@@ -327,12 +327,12 @@
 
   msg = MALLOC(HELO_Message_size(tmp));
   memcpy(msg, tmp, HELO_Message_size(tmp));
-  MUTEX_LOCK(&lock_);   
+  MUTEX_LOCK(&lock_);
   FREENONNULL(tempHosts[tempHostsNextSlot]);
   tempHosts[tempHostsNextSlot++] = msg;
   if (tempHostsNextSlot >= MAX_TEMP_HOSTS)
     tempHostsNextSlot = 0;
-  MUTEX_UNLOCK(&lock_);   
+  MUTEX_UNLOCK(&lock_);
 }
 
 /**
@@ -343,22 +343,22 @@
   char * fn;
   int i;
 
-  MUTEX_LOCK(&lock_);   
+  MUTEX_LOCK(&lock_);
   for (i=0;i<count_;i++)
     if ( (hostIdentityEquals(identity,
                             &hosts_[i].identity)) &&
         (protocol == hosts_[i].protocol) ) {
       hosts_[i] = hosts_[count_-1];
-      count_--;   
+      count_--;
       /* now remove the file */
       fn = getHostFileName(identity, protocol);
       if (0 != UNLINK(fn))
        LOG_FILE_STRERROR(LOG_WARNING, "unlink", fn);
       FREE(fn);
-      MUTEX_UNLOCK(&lock_);   
+      MUTEX_UNLOCK(&lock_);
       return; /* deleted */
     }
-  MUTEX_UNLOCK(&lock_);   
+  MUTEX_UNLOCK(&lock_);
 }
 
 /**
@@ -379,10 +379,10 @@
 #if DEBUG_IDENTITY
   LOG(LOG_INFO,
       "Binding address of node %s.%d\n",
-      &enc, 
+      &enc,
       ntohs(msg->protocol));
 #endif
-  fn = getHostFileName(&msg->senderIdentity,                  
+  fn = getHostFileName(&msg->senderIdentity,           
                       ntohs(msg->protocol));
   buffer = MALLOC(MAX_BUFFER_SIZE);
   size = readFile(fn,
@@ -393,13 +393,13 @@
     if (ntohl(oldMsg->expirationTime) > ntohl(msg->expirationTime)) {
       FREE(fn);
       FREE(buffer);
-      return; /* have more recent HELO in stock */    
+      return; /* have more recent HELO in stock */
     }
   }
   writeFile(fn,
-           msg, 
+           msg,
            HELO_Message_size(msg),
-           "644"); 
+           "644");
   FREE(fn);
   FREE(buffer);
   addHostToKnown(&msg->senderIdentity,
@@ -424,26 +424,26 @@
     HELO_Message buffer;
     int size;
     size_t n;
-        
+
     n = strlen(networkIdDirectory) + strlen(fn) + 1;
     fileName = MALLOC(n);
     SNPRINTF(fileName,
             n,
             "%s%s",
-            networkIdDirectory, 
+            networkIdDirectory,
             fn);
-    size = readFile(fileName, 
-                   sizeof(HELO_Message), 
+    size = readFile(fileName,
+                   sizeof(HELO_Message),
                    &buffer);
     if (size == sizeof(HELO_Message)) {
       HELO_Message * tmp;
       tmp = MALLOC(HELO_Message_size(&buffer));
-      size = readFile(fileName, 
+      size = readFile(fileName,
                      HELO_Message_size(&buffer),
                      tmp);
       if ((unsigned int)size != HELO_Message_size(&buffer)) {
-       if (0 == UNLINK(fileName))        
-         LOG(LOG_WARNING, 
+       if (0 == UNLINK(fileName))      
+         LOG(LOG_WARNING,
              _("Removed file '%s' containing invalid peer advertisement.\n"),
              fileName);
        else
@@ -453,7 +453,7 @@
        if (res->result == SYSERR) {
          res->result = OK;
          res->helo = tmp;
-       } else { 
+       } else {
          if (randomi(4) > 2) {
            FREE(res->helo);
            res->helo = tmp;
@@ -490,7 +490,7 @@
 static int identity2Helo(const PeerIdentity *  hostId,
                         const unsigned short protocol,
                         int tryTemporaryList,
-                        HELO_Message ** result) {  
+                        HELO_Message ** result) {
   struct TempStorage_ tempStorage;
   char * fn;
   HELO_Message buffer;
@@ -499,20 +499,20 @@
 
   *result = NULL;
   fn = getHostFileName(hostId, protocol);
-  size = readFile(fn, 
-                 sizeof(HELO_Message), 
+  size = readFile(fn,
+                 sizeof(HELO_Message),
                  &buffer);
   if (size == sizeof(HELO_Message)) {
     *result = MALLOC(HELO_Message_size(&buffer));
-    size = readFile(fn, 
+    size = readFile(fn,
                    HELO_Message_size(&buffer),
                    *result);
     if ((unsigned int)size != HELO_Message_size(&buffer)) {
       if (0 == UNLINK(fn))
-       LOG(LOG_WARNING, 
+       LOG(LOG_WARNING,
            _("Removed file '%s' containing invalid HELO data.\n"),
            fn);
-      else 
+      else
        LOG_FILE_STRERROR(LOG_ERROR, "unlink", fn);
       FREE(fn);
       FREE(*result);
@@ -523,7 +523,7 @@
     return OK;
   } else if (size != -1) {
     if (0 == UNLINK(fn))
-      LOG(LOG_WARNING, 
+      LOG(LOG_WARNING,
          _("Removed invalid HELO file '%s'\n"),
          fn);
     else
@@ -532,8 +532,8 @@
   FREE(fn);
 
   if (YES == tryTemporaryList) {
-    /* ok, then try temporary hosts */      
-    MUTEX_LOCK(&lock_);   
+    /* ok, then try temporary hosts */
+    MUTEX_LOCK(&lock_);
     for (i=0;i<MAX_TEMP_HOSTS;i++) {
       if ( (tempHosts[i] != NULL) &&
           hostIdentityEquals(hostId,
@@ -543,14 +543,14 @@
        *result = MALLOC(HELO_Message_size(tempHosts[i]));
        memcpy(*result,
               tempHosts[i],
-              HELO_Message_size(tempHosts[i]));            
-       MUTEX_UNLOCK(&lock_);   
+              HELO_Message_size(tempHosts[i]));        
+       MUTEX_UNLOCK(&lock_);
        return OK;
-      }    
+      }
     }
-    MUTEX_UNLOCK(&lock_);   
+    MUTEX_UNLOCK(&lock_);
   }
-  if (protocol != ANY_PROTOCOL_NUMBER) 
+  if (protocol != ANY_PROTOCOL_NUMBER)
     return SYSERR; /* nothing found */
   /* ok, last chance, scan directory! */
   hash2enc(&hostId->hashPubKey,
@@ -616,7 +616,7 @@
   if (desperation < 0)
     desperation = 0;
   ret = SYSERR;
-  MUTEX_LOCK(&lock_);   
+  MUTEX_LOCK(&lock_);
   for (i=0;i<count_;i++) {
     if (hostIdentityEquals(identity,
                           &hosts_[i].identity)) {
@@ -626,20 +626,20 @@
           updates the software eventually...) */
        hosts_[i].delta = 1 * cronDAYS;
       } else {
-       hosts_[i].delta 
+       hosts_[i].delta
          = hosts_[i].delta * 2 + randomi((desperation+1)*cronSECONDS);
-       if (hosts_[i].delta > 4 * cronHOURS) 
-         hosts_[i].delta = 4 *  cronHOURS+randomi(desperation+1); 
+       if (hosts_[i].delta > 4 * cronHOURS)
+         hosts_[i].delta = 4 *  cronHOURS+randomi(desperation+1);
       }
-      cronTime(&hosts_[i].until);      
+      cronTime(&hosts_[i].until);
       hosts_[i].until += hosts_[i].delta;
       hosts_[i].strict = strict;
       hash2enc(&identity->hashPubKey,
               &hn);
 #if DEBUG_IDENTITY
-      LOG(LOG_INFO, 
+      LOG(LOG_INFO,
          "Blacklisting host '%s' (%d) for %llu seconds until %llu 
(strict=%d).\n",
-         &hn, 
+         &hn,
          i,
          hosts_[i].delta / cronSECONDS,
          hosts_[i].until,
@@ -648,35 +648,35 @@
       ret = OK;
     }
   }
-  MUTEX_UNLOCK(&lock_);   
+  MUTEX_UNLOCK(&lock_);
   return ret;
 }
 
 /**
- * Is the host currently 'strictly' blacklisted (i.e. we refuse to talk)? 
- * 
+ * Is the host currently 'strictly' blacklisted (i.e. we refuse to talk)?
+ *
  * @param identity host to check
  * @return YES if true, else NO
  */
 static int isBlacklistedStrict(const PeerIdentity * identity) {
   int i;
   cron_t now;
-  
-  MUTEX_LOCK(&lock_);   
+
+  MUTEX_LOCK(&lock_);
   for (i=0;i<count_;i++) {
     if (hostIdentityEquals(identity,
                           &hosts_[i].identity)) {
-      cronTime(&now);                           
+      cronTime(&now);                  
       if ( (now < hosts_[i].until) && (hosts_[i].strict == YES) ) {
-        MUTEX_UNLOCK(&lock_);   
+        MUTEX_UNLOCK(&lock_);
         return YES;
       } else {
-        MUTEX_UNLOCK(&lock_);   
+        MUTEX_UNLOCK(&lock_);
         return NO;
       }
     }
   }
-  MUTEX_UNLOCK(&lock_);   
+  MUTEX_UNLOCK(&lock_);
   return NO;
 }
 
@@ -689,18 +689,18 @@
 static int whitelistHost(const PeerIdentity * identity) {
   int i;
 
-  MUTEX_LOCK(&lock_);   
+  MUTEX_LOCK(&lock_);
   for (i=0;i<count_;i++) {
     if (hostIdentityEquals(identity,
                           &hosts_[i].identity)) {
       hosts_[i].delta = 30 * cronSECONDS;
       hosts_[i].until = 0;
       hosts_[i].strict = NO;
-      MUTEX_UNLOCK(&lock_);   
+      MUTEX_UNLOCK(&lock_);
       return OK;
     }
   }
-  MUTEX_UNLOCK(&lock_);   
+  MUTEX_UNLOCK(&lock_);
   return SYSERR;
 }
 
@@ -708,7 +708,7 @@
  * Call a method for each known host.
  *
  * @param callback the method to call for each host
- * @param now the time to use for excluding hosts due to blacklisting, use 0 
+ * @param now the time to use for excluding hosts due to blacklisting, use 0
  *        to go through all hosts.
  * @param data an argument to pass to the method
  * @return the number of hosts matching
@@ -719,12 +719,12 @@
   int i;
   int count = 0;
 
-  MUTEX_LOCK(&lock_);   
+  MUTEX_LOCK(&lock_);
   for (i=0;i<count_;i++) {
     if (hostIdentityEquals(&hosts_[i].identity,
                           &myIdentity))
       continue;
-    if ( (now == 0) || 
+    if ( (now == 0) ||
         (now >= hosts_[i].until) ) {
       count++;
       if (callback != NULL) {
@@ -733,17 +733,17 @@
 
        hi = hosts_[i].identity;
        proto = hosts_[i].protocol;
-       MUTEX_UNLOCK(&lock_);   
-       callback(&hi, 
-                proto, 
+       MUTEX_UNLOCK(&lock_);
+       callback(&hi,
+                proto,
                 YES,
-                data);      
-       MUTEX_LOCK(&lock_);   
+                data);
+       MUTEX_LOCK(&lock_);
       }
     }
   }
   /* FIXME: also iterate over temporary list */
-  MUTEX_UNLOCK(&lock_);   
+  MUTEX_UNLOCK(&lock_);
   return count;
 }
 
@@ -777,9 +777,9 @@
     }
   } else {
     trust = htonl(host->trust);
-    writeFile(fn, 
+    writeFile(fn,
              &trust,
-             sizeof(unsigned int), 
+             sizeof(unsigned int),
              "644");
   }
   FREE(fn);
@@ -790,10 +790,10 @@
  */
 static void cronFlushTrustBuffer(void * unused) {
   int i;
-  MUTEX_LOCK(&lock_);   
-  for (i=0;i<count_;i++) 
+  MUTEX_LOCK(&lock_);
+  for (i=0;i<count_;i++)
     flushHostCredit(&hosts_[i]);
-  MUTEX_UNLOCK(&lock_);   
+  MUTEX_UNLOCK(&lock_);
 }
 
 /**
@@ -862,7 +862,7 @@
                       _("Configuration file must specify a "
                         "directory for GNUnet to store "
                         "per-peer data under %s%s\n"));
-  trustDirectory = MALLOC(strlen(gnHome) + 
+  trustDirectory = MALLOC(strlen(gnHome) +
                          strlen(TRUSTDIR)+2);
   strcpy(trustDirectory, gnHome);
   strcat(trustDirectory, "/");
@@ -874,7 +874,7 @@
   addCronJob(&cronScanDirectoryDataHosts,
             15 * cronMINUTES,
             15 * cronMINUTES,
-            NULL); 
+            NULL);
   addCronJob(&cronFlushTrustBuffer,
             5 * cronMINUTES,
             5 * cronMINUTES,

Modified: GNUnet/src/applications/identity/identitytest.c
===================================================================
--- GNUnet/src/applications/identity/identitytest.c     2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/identity/identitytest.c     2005-03-20 23:54:53 UTC 
(rev 464)
@@ -49,7 +49,7 @@
   const PublicKey * pkey;
   Signature sig;
   HELO_Message * helo;
-  
+
   transport = requestService("transport");
   identity = requestService("identity");
   if (OK != transport->createHELO(ANY_PROTOCOL_NUMBER,
@@ -62,7 +62,7 @@
   identity->addHost(helo);
   pid = helo->senderIdentity;
   FREE(helo);
-  
+
   identity->changeHostTrust
     (&pid,
      -identity->getHostTrust(&pid));
@@ -83,7 +83,7 @@
   identity->getPeerIdentity(pkey,
                            &pid);
   ASSERT(0 == identity->getHostTrust(&pid));
-  
+
   pkey = identity->getPublicPrivateKey();
   ASSERT(OK == identity->signData("TestData",
                                  8,
@@ -92,7 +92,7 @@
                         8,
                         &sig,
                         pkey));
-  
+
   /* to test:
      HELO verification, temporary storage,
      permanent storage, blacklisting, etc. */
@@ -102,9 +102,9 @@
 }
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parser(int argc, 
+static int parser(int argc,
                  char * argv[]) {
   FREENONNULL(setConfigurationString("FILES",
                                     "gnunet.conf",

Modified: GNUnet/src/applications/pingpong/pingpong.c
===================================================================
--- GNUnet/src/applications/pingpong/pingpong.c 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/pingpong/pingpong.c 2005-03-20 23:54:53 UTC (rev 
464)
@@ -37,7 +37,7 @@
  * exactly the same message, except that it is now a pong.
  * This message can be send in plaintext and without padding
  * and typically does make little sense (except keepalive)
- * for an encrypted (authenticated) tunnel. 
+ * for an encrypted (authenticated) tunnel.
  * <br>
  * There is also no proof that the other side actually
  * has the acclaimed identity, the only thing that is
@@ -96,18 +96,18 @@
 static int pingReceived(const PeerIdentity * sender,
                        const p2p_HEADER * msg) {
   PINGPONG_Message * pmsg;
-  
+
   if (ntohs(msg->size) != sizeof(PINGPONG_Message) ) {
     LOG(LOG_WARNING,
        _("Received malformed '%s' message. Dropping.\n"),
-       "ping");  
+       "ping");
     return SYSERR;
   }
   pmsg = (PINGPONG_Message *) msg;
   if (!hostIdentityEquals(coreAPI->myIdentity,
                          &pmsg->receiver)) {
     LOG(LOG_WARNING,
-       _("Received ping for another peer. Dropping.\n"));  
+       _("Received ping for another peer. Dropping.\n"));
     return SYSERR; /* not for us */
   }
   pmsg->header.type = htons(p2p_PROTO_PONG);
@@ -122,12 +122,12 @@
                         const PINGPONG_Message * msg) {
   HELO_Message * helo;
   TSession * mytsession;
-  
+
   if (SYSERR == identity->identity2Helo(peer,
-                                       ANY_PROTOCOL_NUMBER, 
+                                       ANY_PROTOCOL_NUMBER,
                                        YES,
-                                       &helo)) 
-    return SYSERR;  
+                                       &helo))
+    return SYSERR;
   if (SYSERR == transport->connect(helo, &mytsession)) {
     FREE(helo);
     return SYSERR;
@@ -139,7 +139,7 @@
     return SYSERR;
   }
   transport->disconnect(mytsession);
-  return OK;  
+  return OK;
 }
 
 /**
@@ -154,7 +154,7 @@
   if (ntohs(hmsg->size) != sizeof(PINGPONG_Message) ) {
     LOG(LOG_WARNING,
        _("Received malformed '%s' message. Dropping.\n"),
-       "ping");     
+       "ping");
     return SYSERR;
   }
   pmsg = (PINGPONG_Message *) hmsg;
@@ -170,7 +170,7 @@
   if (OK != coreAPI->sendPlaintext(tsession,
                                   (char*) pmsg,
                                   sizeof(PINGPONG_Message))) {
-    return sendPlaintext(sender, pmsg); 
+    return sendPlaintext(sender, pmsg);
   }
   return OK;
 }
@@ -190,10 +190,10 @@
                           &pmsg->receiver)) {
     LOG(LOG_WARNING,
        _("Received malformed '%s' message. Dropping.\n"),
-       "pong");     
+       "pong");
     return SYSERR; /* bad pong */
   }
-  MUTEX_LOCK(pingPongLock);   
+  MUTEX_LOCK(pingPongLock);
   for (i=0;i<MAX_PING_PONG;i++) {
     entry = &pingPongs[i];
     if ( ((int)ntohl(pmsg->challenge) == entry->challenge) &&
@@ -207,7 +207,7 @@
             sizeof(PingPongEntry));
     }
   }
-  MUTEX_UNLOCK(pingPongLock);   
+  MUTEX_UNLOCK(pingPongLock);
   return OK;
 }
 
@@ -227,10 +227,10 @@
                           &pmsg->receiver)) {
     LOG(LOG_WARNING,
        _("Received malformed '%s' message. Dropping.\n"),
-       "pong");     
+       "pong");
     return SYSERR; /* bad pong */
   }
-  MUTEX_LOCK(pingPongLock);   
+  MUTEX_LOCK(pingPongLock);
   for (i=0;i<MAX_PING_PONG;i++) {
     entry = &pingPongs[i];
     if ( ((int)ntohl(pmsg->challenge) == entry->challenge) &&
@@ -245,7 +245,7 @@
             sizeof(PingPongEntry));
     }
   }
-  MUTEX_UNLOCK(pingPongLock);   
+  MUTEX_UNLOCK(pingPongLock);
   return OK;
 }
 
@@ -261,9 +261,9 @@
  * @param plaintext is the PONG expected to be in plaintext (YES/NO)
  * @returns NULL on error, otherwise the PING message
  */
-static p2p_HEADER * 
+static p2p_HEADER *
 createPing(const PeerIdentity * receiver,
-          CronJob method,         
+          CronJob method,      
           void * data,
           int plaintext) {
   int i;
@@ -273,17 +273,17 @@
   TIME_T now;
   PINGPONG_Message * pmsg;
 
-  MUTEX_LOCK(pingPongLock);   
+  MUTEX_LOCK(pingPongLock);
   now = TIME(&min); /* set both, tricky... */
-  
+
   j = -1;
-  for (i=0;i<MAX_PING_PONG;i++) 
+  for (i=0;i<MAX_PING_PONG;i++)
     if (min > pingPongs[i].sendTime) {
       min = pingPongs[i].sendTime;
       j = i;
     }
   if (j == -1) { /* all send this second!? */
-    MUTEX_UNLOCK(pingPongLock);     
+    MUTEX_UNLOCK(pingPongLock);
     return NULL;
   }
   entry = &pingPongs[j];
@@ -303,7 +303,7 @@
         sizeof(PeerIdentity));
   entry->challenge = rand();
   pmsg->challenge = htonl(entry->challenge);
-  MUTEX_UNLOCK(pingPongLock);     
+  MUTEX_UNLOCK(pingPongLock);
   return &pmsg->header;
 }
 
@@ -322,8 +322,8 @@
                        void * data) {
   PINGPONG_Message * pmsg;
 
-  pmsg = (PINGPONG_Message*) createPing(receiver, 
-                                       method, 
+  pmsg = (PINGPONG_Message*) createPing(receiver,
+                                       method,
                                        data,
                                        usePlaintext);
   if (pmsg == NULL)
@@ -361,7 +361,7 @@
                                        YES);
   if (pmsg == NULL)
     return SYSERR;
-  coreAPI->sendPlaintext(session, 
+  coreAPI->sendPlaintext(session,
                         (char*)pmsg,
                         sizeof(PINGPONG_Message));
   FREE(pmsg);

Modified: GNUnet/src/applications/rpc/parameters.c
===================================================================
--- GNUnet/src/applications/rpc/parameters.c    2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/rpc/parameters.c    2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 
 /**
  * @file rpc/parameters.c
- * @brief  This file provides convenience methods for parameter 
+ * @brief  This file provides convenience methods for parameter
  * handling.
  * @author Antti Salonen, Christian Grothoff
  */
@@ -29,7 +29,7 @@
 #include "gnunet_rpc_service.h"
 
 /**
- * A parameter to/from an RPC call. These (and nothing else) are stored in 
+ * A parameter to/from an RPC call. These (and nothing else) are stored in
  * the Vector of the RPC_Param structure.
  */
 typedef struct {
@@ -51,7 +51,7 @@
  * Free the memory used by an RPC parameter structure. All parameter names and
  * values residing in the structure are freed, and thus all pointers returned
  * by this abstractions become dangling.
- * 
+ *
  * @param param The RPC parameter structure to be freed
  */
 void RPC_paramFree(RPC_Param *param) {
@@ -86,7 +86,7 @@
   for (i = 0; i < RPC_paramCount(param); i++) {
     paramName = RPC_paramName(param, i);
     paramValue = NULL;
-    RPC_paramValueByPosition(param, 
+    RPC_paramValueByPosition(param,
                             i,
                             &dataLength,
                             &paramValue);
@@ -134,12 +134,12 @@
       RPC_paramFree(ret);
       return NULL;
     }
-    
+
     RPC_paramAdd(ret,
                 &buffer[xpos],
                 dataLength,
                 &buffer[pos]);
-    pos += dataLength;    
+    pos += dataLength;
   }
   return ret;
 }
@@ -153,21 +153,21 @@
   unsigned int dataLength;
   void * paramValue;
   size_t pos;
-  
+
   if (param == NULL)
     return 0;
   pos = 0;
   for (i = 0; i < RPC_paramCount(param); i++) {
     paramName = RPC_paramName(param, i);
     paramValue = NULL;
-    RPC_paramValueByPosition(param, 
+    RPC_paramValueByPosition(param,
                             i,
                             &dataLength,
                             &paramValue);
-    if (pos + strlen(paramName)+1+sizeof(unsigned int) < pos) 
-      return 0;    
+    if (pos + strlen(paramName)+1+sizeof(unsigned int) < pos)
+      return 0;
     pos += strlen(paramName)+1;
-    pos += sizeof(unsigned int);    
+    pos += sizeof(unsigned int);
     if (pos + dataLength < pos)
       return 0;
     pos += dataLength;
@@ -201,7 +201,7 @@
  * @param data Value of the parameter
  */
 
-void RPC_paramAdd(RPC_Param *param, 
+void RPC_paramAdd(RPC_Param *param,
                  const char *name,
                  unsigned int dataLength,
                  const void *data) {
@@ -233,7 +233,7 @@
  * @param dataLength Length of the value of the parameter
  * @param data Value of the parameter
  */
-void RPC_paramAddDataContainer(RPC_Param *param, 
+void RPC_paramAddDataContainer(RPC_Param *param,
                               const char *name,
                               const DataContainer * data) {
   Parameter * new;
@@ -247,8 +247,8 @@
     new->data = NULL;
   } else {
     new->data = MALLOC(new->dataLength);
-    memcpy(new->data, 
-          &data[1], 
+    memcpy(new->data,
+          &data[1],
           new->dataLength);
   }
   vectorInsertLast(param, new);
@@ -299,7 +299,7 @@
     }
     p = vectorGetNext(param);
   }
-                     
+               
   return SYSERR;
 }
 
@@ -331,7 +331,7 @@
     }
     p = vectorGetNext(param);
   }
-                     
+               
   return NULL;
 }
 
@@ -341,12 +341,12 @@
  * @param param Target RPC parameter structure
  * @param value set to the value of the parameter
  */
-int RPC_paramValueByPosition(RPC_Param *param, 
+int RPC_paramValueByPosition(RPC_Param *param,
                             unsigned int i,
                             unsigned int * dataLength,
                             void ** value) {
   Parameter * p;
- 
+
   if (param == NULL)
     return SYSERR;
   p = vectorGetAt(param, i);
@@ -365,11 +365,11 @@
  * @param value set to the value of the parameter
  */
 DataContainer *
-RPC_paramDataContainerByPosition(RPC_Param *param, 
+RPC_paramDataContainerByPosition(RPC_Param *param,
                                 unsigned int i) {
   Parameter * p;
   DataContainer * ret;
- 
+
   if (param == NULL)
     return NULL;
   p = vectorGetAt(param, i);

Modified: GNUnet/src/applications/rpc/parameterstest.c
===================================================================
--- GNUnet/src/applications/rpc/parameterstest.c        2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/rpc/parameterstest.c        2005-03-20 23:54:53 UTC 
(rev 464)
@@ -1,4 +1,4 @@
-/** 
+/**
  * @file applications/rpc/parameterstest.c
  * @brief testcase for parameters.c
  * @author Christian Grothoff
@@ -50,12 +50,12 @@
   buf = MALLOC(size);
   RPC_paramSerialize(p, buf);
   RPC_paramFree(p);
-  p = RPC_paramDeserialize(buf, 
+  p = RPC_paramDeserialize(buf,
                           size);
   FREE(buf);
   if (p == NULL)
     return 1;
-  
+
   if (OK != RPC_paramValueByName(p,
                                 "foo",
                                 &len,

Modified: GNUnet/src/applications/rpc/rpc.c
===================================================================
--- GNUnet/src/applications/rpc/rpc.c   2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/applications/rpc/rpc.c   2005-03-20 23:54:53 UTC (rev 464)
@@ -58,14 +58,14 @@
 /**
  * After what time do we time-out every request (if it is not
  * repeated)?
- */ 
+ */
 #define MAX_RPC_TIMEOUT (2 * cronMINUTES)
 
 
 #if DEBUG_RPC_CLIENT
 #define RPC_STATUS(a,b,c) LOG(LOG_DEBUG, "RPC: '%s' (%p) %s at %s\n", a, c, b, 
__FUNCTION__);
 #else
-#define RPC_STATUS(a,b,c) 
+#define RPC_STATUS(a,b,c)
 #endif
 
 
@@ -99,10 +99,10 @@
    */
   ASYNC_RPC_Function async_callback;
 } RegisteredRPC;
-  
+
 /**
- * A set of RegisteredRPC structures, one for each RPC registered by the 
- * local node. 
+ * A set of RegisteredRPC structures, one for each RPC registered by the
+ * local node.
  */
 static struct Vector * list_of_callbacks;
 
@@ -128,7 +128,7 @@
       LOG(LOG_WARNING,
          _("%s::%s - RPC %s:%p could not be registered:"
            " another callback is already using this name (%p)\n"),
-         __FILE__, __FUNCTION__, 
+         __FILE__, __FUNCTION__,
          name, callback, rrpc->callback);
       return SYSERR;
     }
@@ -141,7 +141,7 @@
   vectorInsertLast(list_of_callbacks, rrpc);
   LOG(LOG_DEBUG,
       "%s::%s - Registered RPC %d: %s\n",
-      __FILE__, __FUNCTION__, 
+      __FILE__, __FUNCTION__,
       vectorSize(list_of_callbacks), name);
   MUTEX_UNLOCK (rpcLock);
   return OK;
@@ -168,7 +168,7 @@
       LOG(LOG_WARNING,
          _("%s::%s - RPC %s:%p could not be registered:"
            " another callback is already using this name (%p)\n"),
-         __FILE__, __FUNCTION__, 
+         __FILE__, __FUNCTION__,
          name, callback, rrpc->callback);
       return SYSERR;
     }
@@ -181,7 +181,7 @@
   vectorInsertLast(list_of_callbacks, rrpc);
   LOG(LOG_DEBUG,
       "%s::%s - Registered asynchronous RPC %d: %s\n",
-      __FILE__, __FUNCTION__, 
+      __FILE__, __FUNCTION__,
       vectorSize(list_of_callbacks), name);
   MUTEX_UNLOCK (rpcLock);
   return OK;
@@ -210,19 +210,19 @@
        LOG(LOG_WARNING,
            _("%s::%s - RPC %s:%p could not be unregistered:"
              " another callback registered under that name: %p\n"),
-           __FILE__, __FUNCTION__, 
+           __FILE__, __FUNCTION__,
            name, callback, rrpc->callback);            
        MUTEX_UNLOCK (rpcLock);
        return SYSERR;
-      } 
+      }
       vectorRemoveObject(list_of_callbacks, rrpc);
       FREE(rrpc->name);
       FREE(rrpc);
       MUTEX_UNLOCK(rpcLock);
       LOG(LOG_DEBUG,
          "%s::%s - Unregistered RPC %s\n",
-         __FILE__, __FUNCTION__, 
-         name); 
+         __FILE__, __FUNCTION__,
+         name);
       return OK;
     }
     rrpc = vectorGetNext(list_of_callbacks);
@@ -230,9 +230,9 @@
   MUTEX_UNLOCK(rpcLock);
   LOG(LOG_WARNING,
       _("%s::%s - RPC %s:%p could not be unregistered: not found\n"),
-      __FILE__, __FUNCTION__, 
+      __FILE__, __FUNCTION__,
       name, callback);
-  return SYSERR; 
+  return SYSERR;
 }
 
 /**
@@ -257,19 +257,19 @@
        LOG(LOG_WARNING,
            _("%s::%s - RPC %s:%p could not be unregistered:"
              " another callback registered under that name: %p\n"),
-           __FILE__, __FUNCTION__, 
+           __FILE__, __FUNCTION__,
            name, callback, rrpc->callback);            
        MUTEX_UNLOCK (rpcLock);
        return SYSERR;
-      } 
+      }
       vectorRemoveObject(list_of_callbacks, rrpc);
       FREE(rrpc->name);
       FREE(rrpc);
       MUTEX_UNLOCK(rpcLock);
       LOG(LOG_DEBUG,
          "%s::%s - Unregistered asynchronous RPC %s\n",
-         __FILE__, __FUNCTION__, 
-         name); 
+         __FILE__, __FUNCTION__,
+         name);
       return OK;
     }
     rrpc = vectorGetNext(list_of_callbacks);
@@ -277,9 +277,9 @@
   MUTEX_UNLOCK(rpcLock);
   LOG(LOG_WARNING,
       _("%s::%s - async RPC %s:%p could not be unregistered: not found\n"),
-      __FILE__, __FUNCTION__, 
+      __FILE__, __FUNCTION__,
       name, callback);
-  return SYSERR; 
+  return SYSERR;
 }
 
 
@@ -335,7 +335,7 @@
    * Index to the smallest value in lastRequestTimes.
    */
   unsigned int oldestRTIndex;
-  
+
 } PeerInfo;
 
 /**
@@ -347,11 +347,11 @@
 
 static PeerInfo * getPeerInfo(const PeerIdentity * id) {
   PeerInfo * pi;
-  
+
   pi = (PeerInfo*) vectorGetFirst(peerInformation);
   while (pi != NULL) {
     if (hostIdentityEquals(id,
-                          &pi->identity)) 
+                          &pi->identity))
       return pi;
     pi = (PeerInfo*) vectorGetNext(peerInformation);
   }
@@ -391,8 +391,8 @@
         (pi->agedActivityRecv == 0) ) {
       vectorRemoveObject(peerInformation, pi);
       FREE(pi);
-    }      
-    
+    }
+
     pi = vectorGetNext(peerInformation);
   }
   MUTEX_UNLOCK(rpcLock);
@@ -488,7 +488,7 @@
  * indicate the number of return values.
  */
 typedef struct {
-  p2p_HEADER header; 
+  p2p_HEADER header;
   TIME_T timestamp;
   unsigned int sequenceNumber;
   unsigned int importance;
@@ -514,7 +514,7 @@
  * times out).
  */
 typedef struct {
-  p2p_HEADER header; 
+  p2p_HEADER header;
   /**
    * The number of the original request for which this is the
    * ACK.
@@ -584,7 +584,7 @@
    * If this was a request initiated by this node we'll have to pass
    * the result back to the original caller.  This gives the method
    * and some context args that needs to be invoked.
-   */ 
+   */
   RPCFinishedCallback finishedCallback;
 
   /**
@@ -625,7 +625,7 @@
  */
 static void retryRPCJob(CallInstance * call) {
   cron_t now;
- 
+
   cronTime(&now);
   GNUNET_ASSERT( (cronTime(NULL) + 1 * cronMINUTES > call->expirationTime) ||
                 (call->expirationTime - cronTime(NULL) < 1 * cronHOURS) );
@@ -644,16 +644,16 @@
       vectorRemoveObject(outgoingCalls, call);
     } else {
       vectorRemoveObject(incomingCalls, call);
-    }    
+    }  
     FREE(call->msg);
     FREE(call);
   } else {
-    if ( (coreAPI != NULL) && 
+    if ( (coreAPI != NULL) &&
         (call->expirationTime - now > 50 * cronMILLIS) ) {
       unsigned int maxdelay;
 
       if (call->repetitionFrequency == 0) {
-       call->repetitionFrequency 
+       call->repetitionFrequency
          = getExpectedResponseTime(&call->receiver) * 2;
        if (call->repetitionFrequency == 0)
          call->repetitionFrequency = INITIAL_RPC_FREQUENCY;
@@ -665,7 +665,7 @@
       if (maxdelay > call->repetitionFrequency / 2)
        maxdelay = call->repetitionFrequency / 2;
       notifyPeerRequest(&call->receiver,
-                       MINGLE(call->sequenceNumber, 
+                       MINGLE(call->sequenceNumber,
                               ntohs(call->msg->header.type)));
 #if DEBUG_RPC
       if (ntohs(call->msg->header.type) == RPC_p2p_PROTO_REQ) {
@@ -692,7 +692,7 @@
                       &call->msg->header,
                       ntohl(call->msg->importance),
                       maxdelay);
-    } 
+    }
     GNUNET_ASSERT( (cronTime(NULL) + 1 * cronMINUTES > call->expirationTime) ||
                   (call->expirationTime - cronTime(NULL) < 1 * cronHOURS) );
     addCronJob((CronJob) &retryRPCJob,
@@ -700,7 +700,7 @@
               0,
               call);
   }
-  MUTEX_UNLOCK(rpcLock);    
+  MUTEX_UNLOCK(rpcLock);
 }
 
 /**
@@ -708,15 +708,15 @@
  */
 static void sendAck(const PeerIdentity * receiver,
                    unsigned int sequenceNumber,
-                   unsigned int importance, 
+                   unsigned int importance,
                    unsigned int maxDelay) {
   RPC_ACK_Message msg;
 
-  msg.header.size = htons(sizeof(RPC_ACK_Message)); 
+  msg.header.size = htons(sizeof(RPC_ACK_Message));
   msg.header.type = htons(RPC_p2p_PROTO_ACK);
-  msg.sequenceNumber = htonl(sequenceNumber);  
-  coreAPI->unicast(receiver, 
-                  &msg.header, 
+  msg.sequenceNumber = htonl(sequenceNumber);
+  coreAPI->unicast(receiver,
+                  &msg.header,
                   importance,
                   maxDelay);
 }
@@ -781,7 +781,7 @@
     slen = 0;
   if (values != NULL)
     size += RPC_paramSize(values);
-  if (size >= MAX_BUFFER_SIZE) 
+  if (size >= MAX_BUFFER_SIZE)
     return NULL; /* message to big! */
   ret = MALLOC(size);
   ret->header.size = htons(size);
@@ -800,7 +800,7 @@
   }
   RPC_paramSerialize(values,
                     &((RPC_Message_GENERIC*)ret)->data[slen]);
-  
+
   if (name == NULL)
     ret->header.type = htons(RPC_p2p_PROTO_RES);
   else
@@ -821,7 +821,7 @@
  */
 static void async_rpc_complete_callback(RPC_Param * results,
                                        int errorCode,
-                                       CallInstance * calls) {  
+                                       CallInstance * calls) {
   MUTEX_LOCK (rpcLock);
   /* build reply message */
   calls->msg = buildMessage(errorCode,
@@ -864,15 +864,15 @@
   RPC_Param * returnValues;
   RegisteredRPC * rpc;
   unsigned int minSQ;
-  
+
   if ( (ntohs(message->type) != RPC_p2p_PROTO_REQ) ||
        (ntohs(message->size) < sizeof(RPC_Message)) ) {
-    LOG (LOG_WARNING, 
+    LOG (LOG_WARNING,
         _("Invalid message of type %u received.  Dropping.\n"),
         ntohs(message->type));
     return SYSERR;
   }
-  req = (RPC_Message *) message; 
+  req = (RPC_Message *) message;
   sq = ntohl(req->sequenceNumber);
 #if DEBUG_RPC
   LOG(LOG_DEBUG,
@@ -895,7 +895,7 @@
       minSQ = calls->sequenceNumber;
     if ( (calls->sequenceNumber == sq) &&
         (hostIdentityEquals(&calls->receiver,
-                            sender)) ) 
+                            sender)) )
       break;
     calls = vectorGetNext(incomingCalls);
   }
@@ -903,7 +903,7 @@
     PeerInfo * pi = getPeerInfo(sender);
     if (pi->averageResponseTime < MAX_RPC_TIMEOUT / 2)
       pi->averageResponseTime *= 2;
-    RPC_STATUS("", "received duplicate request", calls);    
+    RPC_STATUS("", "received duplicate request", calls);
     calls->expirationTime = cronTime(NULL) + MAX_RPC_TIMEOUT;
     LOG(LOG_DEBUG,
        "Dropping RPC request %u, duplicate.\n",
@@ -917,7 +917,7 @@
        sq,
        minSQ);
     MUTEX_UNLOCK(rpcLock);
-    return OK; /* seen before */   
+    return OK; /* seen before */
   }
 
   /* deserialize */
@@ -933,7 +933,7 @@
        _("Dropping RPC request %u: message malformed.\n"));
     return SYSERR; /* message malformed */
   }
-  
+
   /* find matching RPC function */
   rpc = (RegisteredRPC*) vectorGetFirst(list_of_callbacks);
   while (rpc != NULL) {
@@ -965,10 +965,10 @@
       rpc->async_callback(sender,
                          argumentValues,
                          &async_rpc_complete_callback,
-                         calls);      
+                         calls);
       MUTEX_UNLOCK (rpcLock);
       return OK;
-    } 
+    }
     returnValues = RPC_paramNew();
     rpc->callback(sender,
                  argumentValues,
@@ -978,7 +978,7 @@
   }
   MUTEX_UNLOCK(rpcLock);
   async_rpc_complete_callback(returnValues,
-                             errorCode, 
+                             errorCode,
                              calls);
   return OK;
 }
@@ -1011,7 +1011,7 @@
   MUTEX_LOCK (rpcLock);
 
   /* Locate the CallInstance structure. */
-  call = vectorGetFirst(outgoingCalls); 
+  call = vectorGetFirst(outgoingCalls);
   while (call != NULL) {
     if ( hostIdentityEquals(&call->receiver, sender) &&
         (call->sequenceNumber == ntohl(res->sequenceNumber)) )
@@ -1035,7 +1035,7 @@
        RPC_paramFree(reply);
        reply = NULL;
        error = RPC_ERROR_REPLY_MALFORMED;
-      } 
+      }
     }
     if (call->finishedCallback != NULL) {
       call->finishedCallback(call->rpcCallbackArgs,
@@ -1074,7 +1074,7 @@
                               const p2p_HEADER * message) {
   RPC_ACK_Message * ack;
   CallInstance *call;
-  
+
   if ( (ntohs(message->type) != RPC_p2p_PROTO_ACK) ||
        (ntohs(message->size) != sizeof(RPC_ACK_Message)) ) {
     LOG (LOG_WARNING,
@@ -1093,13 +1093,13 @@
   MUTEX_LOCK(rpcLock);
 
   /* Locate the CallInstance structure. */
-  call = (CallInstance*) vectorGetFirst(incomingCalls); 
+  call = (CallInstance*) vectorGetFirst(incomingCalls);
   while (call != NULL) {
     if ( hostIdentityEquals(&call->receiver, sender) &&
         (call->sequenceNumber == ntohl(ack->sequenceNumber)) )
       break;
     call = (CallInstance*) vectorGetNext(incomingCalls);
-  }  
+  }
 
   /* check if we're waiting for an ACK, if so remove job */
   if (NULL != call) {
@@ -1118,14 +1118,14 @@
     PeerInfo * pi = getPeerInfo(sender);
     if (pi != NULL) {
       if (pi->averageResponseTime < MAX_RPC_TIMEOUT / 2)
-       pi->averageResponseTime *= 2;    
+       pi->averageResponseTime *= 2;
     }
 #if DEBUG_RPC
     LOG(LOG_DEBUG,
        "ACK is a duplicate (or invalid).\n");
 #endif
   }
-  
+
   MUTEX_UNLOCK (rpcLock);
   resumeCron();
   return OK;
@@ -1171,13 +1171,13 @@
  * Executes a blocking RPC on a node, which may be the local node. The
  * function performs the following steps:
  *
- * - Constructs a request packet from the request parameters 
+ * - Constructs a request packet from the request parameters
  * - Waits on a signaling semaphore until the result is ready or timeout
  * - passes the results back to the caller
  *
  * @return the error code of the operation (0 for success).
  */
-static int RPC_execute(const PeerIdentity *receiver, 
+static int RPC_execute(const PeerIdentity *receiver,
                       const char *name,
                       RPC_Param *requestParam,
                       RPC_Param *returnParam,
@@ -1207,7 +1207,7 @@
   vectorInsertLast(outgoingCalls, call);
   GNUNET_ASSERT( (cronTime(NULL) + 1 * cronMINUTES > call->expirationTime) ||
                 (call->expirationTime - cronTime(NULL) < 1 * cronHOURS) );
-  addCronJob((CronJob) &retryRPCJob, 
+  addCronJob((CronJob) &retryRPCJob,
             0,
             0,
             call);
@@ -1237,7 +1237,7 @@
                  rec->closure);
     rec->callback = NULL; /* never call callback twice */
   }
-  rec->errorCode = errorCode; 
+  rec->errorCode = errorCode;
 }
 
 /**
@@ -1245,7 +1245,7 @@
  *
  * @param timeout when should we stop trying the RPC
  * @param callback function to call with the return value from
- *        the RPC 
+ *        the RPC
  * @param closure extra argument to callback
  * @return value required to stop the RPC (and the RPC must
  *  be explicitly stopped to free resources!)
@@ -1258,7 +1258,7 @@
                              RPC_Complete callback,
                              void * closure) {
   RPC_Record * ret;
-  
+
   if (timeout > 1 * cronHOURS) {
     LOG(LOG_WARNING,
        _("'%s' called with timeout above 1 hour (bug?)\n"),
@@ -1290,14 +1290,14 @@
   vectorInsertLast(outgoingCalls, ret->call);
   GNUNET_ASSERT( (cronTime(NULL) + 1 * cronMINUTES > 
ret->call->expirationTime) ||
                 (ret->call->expirationTime - cronTime(NULL) < 1 * cronHOURS) );
-  addCronJob((CronJob) &retryRPCJob, 
+  addCronJob((CronJob) &retryRPCJob,
             0,
             0,
             ret->call);
   MUTEX_UNLOCK (rpcLock);
   return ret;
 }
- 
+
 /**
  * Stop an asynchronous RPC (and free associated resources)
  *
@@ -1306,7 +1306,7 @@
  *  another RPC_ERROR code if it was aborted
  */
 static int RPC_stop(RPC_Record * record) {
-  int ret; 
+  int ret;
   int cronRunning;
 
   RPC_STATUS("", "stopped", record);
@@ -1321,7 +1321,7 @@
   MUTEX_LOCK(rpcLock);
   if (NULL != vectorRemoveObject(outgoingCalls, record->call)) {
     FREE(record->call->msg);
-    FREE(record->call);    
+    FREE(record->call);
   }
   MUTEX_UNLOCK(rpcLock);
   ret = record->errorCode;
@@ -1341,9 +1341,9 @@
   delCronJob(&agePeerStats,
             PEER_TRACKING_TIME_INTERVAL,
             NULL);
-  coreAPI->unregisterHandler(RPC_p2p_PROTO_REQ, 
+  coreAPI->unregisterHandler(RPC_p2p_PROTO_REQ,
                             &handleRPCMessageReq);
-  coreAPI->unregisterHandler(RPC_p2p_PROTO_RES, 
+  coreAPI->unregisterHandler(RPC_p2p_PROTO_RES,
                             &handleRPCMessageRes);
   coreAPI->unregisterHandler(RPC_p2p_PROTO_ACK,
                             &handleRPCMessageAck);
@@ -1400,31 +1400,31 @@
 RPC_ServiceAPI * provide_module_rpc(CoreAPIForApplication * capi) {
   static RPC_ServiceAPI rpcAPI;
   int rvalue;
-  
+
   rpcLock = capi->getConnectionModuleLock();
   coreAPI = capi;
   peerInformation = vectorNew(16);
   incomingCalls = vectorNew(16);
   outgoingCalls = vectorNew(16);
   list_of_callbacks = vectorNew(16);
-  LOG(LOG_DEBUG, 
+  LOG(LOG_DEBUG,
       _("'%s' registering handlers %d %d %d\n"),
       "rpc",
       RPC_p2p_PROTO_REQ,
       RPC_p2p_PROTO_RES,
       RPC_p2p_PROTO_ACK);
   rvalue = OK;
-  if (capi->registerHandler(RPC_p2p_PROTO_REQ, 
+  if (capi->registerHandler(RPC_p2p_PROTO_REQ,
                            &handleRPCMessageReq) ==
-      SYSERR) 
+      SYSERR)
     rvalue = SYSERR;
   if (capi->registerHandler(RPC_p2p_PROTO_RES,
                            &handleRPCMessageRes) ==
-      SYSERR) 
+      SYSERR)
     rvalue = SYSERR;
   if (capi->registerHandler (RPC_p2p_PROTO_ACK,
                             &handleRPCMessageAck) ==
-      SYSERR) 
+      SYSERR)
     rvalue = SYSERR;
   if (rvalue == SYSERR) {
     release_module_rpc();
@@ -1456,14 +1456,14 @@
   unsigned int dl;
   char * data;
 
-  LOG(LOG_DEBUG, 
+  LOG(LOG_DEBUG,
       "RPC callback invoked!\n");
   if ( (OK == RPC_paramValueByName(arguments,
                                   "command",
                                   &dl,
                                   (void**)&data)) &&
        (strncmp("Hello", data, dl) == 0) ) {
-    LOG(LOG_DEBUG, 
+    LOG(LOG_DEBUG,
        "RPC callback received Hello command!\n");
     RPC_paramAdd(results,
                 "response",
@@ -1502,7 +1502,7 @@
   RPC_Record * record;
   Semaphore * sign;
 
-  LOG(LOG_DEBUG, 
+  LOG(LOG_DEBUG,
       "RPC testcase starting\n");
   rpcAPI = capi->requestService("rpc");
   if (rpcAPI == NULL) {
@@ -1540,9 +1540,9 @@
                             5 * cronSECONDS);
   if (code != RPC_ERROR_OK) {
     BREAK();
-    ret = SYSERR; 
+    ret = SYSERR;
   }
-  RPC_paramFree(args);     
+  RPC_paramFree(args);
   if ( (OK != RPC_paramValueByName(rets,
                                   "response",
                                   &dl,
@@ -1552,7 +1552,7 @@
     BREAK();
     ret = SYSERR;
   }
-  RPC_paramFree(rets);     
+  RPC_paramFree(rets);
   gnunet_util_sleep(1 * cronSECONDS);
   if (RPC_ERROR_OK != rpcAPI->RPC_stop(record))
     LOG(LOG_WARNING,
@@ -1563,11 +1563,11 @@
     BREAK();
     ret = SYSERR;
   }
-  if (OK != capi->releaseService(rpcAPI)) { 
+  if (OK != capi->releaseService(rpcAPI)) {
     BREAK();
     ret = SYSERR;
   }
-  LOG(LOG_DEBUG, 
+  LOG(LOG_DEBUG,
       "RPC testcase completed with status %s\n",
       ret == OK ? "SUCCESS" : "FAILURE");
   return ret;

Modified: GNUnet/src/applications/session/connect.c
===================================================================
--- GNUnet/src/applications/session/connect.c   2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/session/connect.c   2005-03-20 23:54:53 UTC (rev 
464)
@@ -52,22 +52,22 @@
 static Topology_ServiceAPI * topology;
 
 /**
- * @brief message for session key exchange.  
+ * @brief message for session key exchange.
  */
 typedef struct {
-  p2p_HEADER header; 
+  p2p_HEADER header;
   /**
-   * time when this key was created  (network byte order) 
+   * time when this key was created  (network byte order)
    * Must be the first field after the header since
    * the signature starts at this offset.
-   */ 
-  TIME_T creationTime; 
+   */
+  TIME_T creationTime;
 
   /**
    * The encrypted session key.  May ALSO contain
    * encrypted PINGs and PONGs.
-   */ 
-  RSAEncryptedData key; 
+   */
+  RSAEncryptedData key;
 
   /**
    * Signature of the stuff above.
@@ -98,14 +98,14 @@
 #endif
 
 /**
- * We received a sign of life from this host. 
- * 
+ * We received a sign of life from this host.
+ *
  * @param hostId the peer that gave a sign of live
  */
 static void notifyPONG(PeerIdentity * hostId) {
-#if DEBUG_SESSION 
+#if DEBUG_SESSION
   EncName enc;
-  
+
   IFLOG(LOG_DEBUG,
        hash2enc(&hostId->hashPubKey,
                 &enc));
@@ -119,9 +119,9 @@
 }
 
 /**
- * Force creation of a new Session key for the given host. 
+ * Force creation of a new Session key for the given host.
  *
- * @param hostId the identity of the other host 
+ * @param hostId the identity of the other host
  * @param sk the SESSIONKEY to use
  * @param created the timestamp to use
  * @param ping optional PING to include (otherwise NULL)
@@ -143,16 +143,16 @@
   GNUNET_ASSERT(sk != NULL);
   foreignHelo = NULL;
   /* create and encrypt sessionkey */
-  if (SYSERR == identity->identity2Helo(hostId, 
+  if (SYSERR == identity->identity2Helo(hostId,
                                        ANY_PROTOCOL_NUMBER,
                                        YES,
                                        &foreignHelo)) {
-    LOG(LOG_INFO, 
-       _("Cannot encrypt sessionkey, other peer not known!\n"));  
-    return NULL; /* other host not known */  
+    LOG(LOG_INFO,
+       _("Cannot encrypt sessionkey, other peer not known!\n"));
+    return NULL; /* other host not known */
   }
   GNUNET_ASSERT(foreignHelo != NULL);
-  
+
   size = sizeof(SKEY_Message);
   if (ping != NULL)
     size += ntohs(ping->size);
@@ -183,7 +183,7 @@
   msg->header.size = htons(size);
   msg->header.type = htons(p2p_PROTO_SKEY);
   msg->creationTime = htonl(created);
-  GNUNET_ASSERT(SYSERR != identity->signData(msg, 
+  GNUNET_ASSERT(SYSERR != identity->signData(msg,
                                             sizeof(SKEY_Message) - 
sizeof(Signature),
                                             &msg->signature));
 #if EXTRA_CHECKS
@@ -192,9 +192,9 @@
 #endif
 
   size = 0;
-  if (ping != NULL) 
+  if (ping != NULL)
     size += ntohs(ping->size);
-  if (pong != NULL) 
+  if (pong != NULL)
     size += ntohs(pong->size);
   if (size > 0) {
     pt = MALLOC(size);
@@ -220,9 +220,9 @@
                                     (const INITVECTOR*) &msg->signature,
                                     &((char*)msg)[sizeof(SKEY_Message)]));
     FREE(pt);
-  } 
+  }
   return msg;
-} 
+}
 
 /**
  * Check if the received session key is properly signed
@@ -236,7 +236,7 @@
 static int verifySKS(const PeerIdentity * hostId,
                     SKEY_Message * sks) {
   char * limited;
-  
+
   if ( (sks == NULL) ||
        (hostId == NULL) ) {
     BREAK();
@@ -290,7 +290,7 @@
     IFLOG(LOG_INFO,
          hash2enc(&hostId->hashPubKey,
                   &enc));
-    LOG(LOG_INFO, 
+    LOG(LOG_INFO,
        _("Session key from peer '%s' could not be verified.\n"),
        &enc);
     return SYSERR; /*reject!*/
@@ -340,11 +340,11 @@
 #endif
     return SYSERR;
   }
-  
+
   /* then try to connect on the transport level */
   if ( (tsession == NULL) ||
        (transport->associate(tsession) == SYSERR) ) {
-    tsession = NULL;    
+    tsession = NULL;
     if (SYSERR == transport->connect(targetHelo, /* callee frees except on 
SYSERR */
                                     &tsession)) {
       FREE(targetHelo);
@@ -355,7 +355,7 @@
 #endif
       return SYSERR; /* failed to connect */
     }
-  } 
+  }
 
   /* get or create out session key */
   if (OK != coreAPI->getCurrentSessionKey(receiver,
@@ -395,7 +395,7 @@
                              ping,
                              pong);
   if (skey == NULL) {
-    FREE(ping);   
+    FREE(ping);
     transport->disconnect(tsession);
     return SYSERR;
   }
@@ -408,7 +408,7 @@
        "Could not create any HELO advertisement.  Not good.");
   }
   size = ntohs(skey->header.size);
-  if (helo != NULL) 
+  if (helo != NULL)
     size += HELO_Message_size(helo);
   sendBuffer = MALLOC(size);
   if (helo != NULL) {
@@ -442,7 +442,7 @@
 /**
  * Accept a session-key that has been sent by another host.
  * The other host must be known (public key).  Notifies
- * the core about the new session key and possibly 
+ * the core about the new session key and possibly
  * triggers sending a session key ourselves (if not
  * already done).
  *
@@ -471,27 +471,27 @@
 #if DEBUG_SESSION
   LOG(LOG_DEBUG,
       "Received session key from peer '%s'.\n",
-      &enc);  
+      &enc);
 #endif
   if (ntohs(msg->size) < sizeof(SKEY_Message)) {
     LOG(LOG_WARNING,
        "Session key received from peer '%s' has invalid format (discarded).\n",
-       &enc);  
+       &enc);
     return SYSERR;
   }
   sessionkeySigned = (SKEY_Message *) msg;
-  if (SYSERR == verifySKS(sender, 
+  if (SYSERR == verifySKS(sender,
                          sessionkeySigned)) {
     LOG(LOG_INFO,
        "Signature of session key from '%s' failed verification (discarded).\n",
        &enc);
-    return SYSERR;  /* rejected */  
+    return SYSERR;  /* rejected */
   }
   size = identity->decryptData(&sessionkeySigned->key,
                               &key,
                               sizeof(SESSIONKEY));
   if (size != sizeof(SESSIONKEY)) {
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("Invalid '%s' message received from peer '%s'.\n"),
        "SKEY",
        &enc);
@@ -499,7 +499,7 @@
   }
   if (key.crc32 !=
       htonl(crc32N(&key, SESSIONKEY_LEN))) {
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("SKEY from '%s' fails CRC check (have: %u, want %u).\n"),
        &enc,
        ntohl(key.crc32),
@@ -561,12 +561,12 @@
     }
   }
   if (pong != NULL) {
-    /* we initiated, this is the response */ 
+    /* we initiated, this is the response */
     /* notify ourselves about encapsulated pong */
 #if DEBUG_SESSION
     LOG(LOG_DEBUG,
        "Received pong in session key, injecting!\n",
-       &enc);  
+       &enc);
 #endif
     coreAPI->injectMessage(sender,
                           (char*) pong,
@@ -578,7 +578,7 @@
 #if DEBUG_SESSION
       LOG(LOG_DEBUG,
          "Received ping in session key, sending pong over normal encrypted 
session!\n",
-         &enc);  
+         &enc);
 #endif
       ping->type = htons(p2p_PROTO_PONG);
       coreAPI->unicast(sender,
@@ -591,14 +591,14 @@
 #if DEBUG_SESSION
       LOG(LOG_DEBUG,
          "Received ping in session key, sending pong together with my session 
key!\n",
-         &enc);  
+         &enc);
 #endif
       ping->type = htons(p2p_PROTO_PONG);
       exchangeKey(sender,
                  tsession,
-                 ping); /* ping is now pong */   
+                 ping); /* ping is now pong */
     } else {
-      BREAK(); 
+      BREAK();
       /* PING not included in SKEY - bug (in other peer!?) */
     }
   }
@@ -609,7 +609,7 @@
 /**
  * Try to connect to the given peer.
  *
- * @return SYSERR if that is impossible, 
+ * @return SYSERR if that is impossible,
  *         YES if a connection is established upon return,
  *         NO if we're going to try to establish one asynchronously
  */
@@ -619,7 +619,7 @@
     return SYSERR;
   if (coreAPI->queryBPMfromPeer(peer) != 0)
     return YES; /* trivial case */
-  if (OK == exchangeKey(peer, NULL, NULL)) 
+  if (OK == exchangeKey(peer, NULL, NULL))
     return NO;
   else
     return SYSERR;
@@ -629,7 +629,7 @@
  * We have received an (encrypted) SKEY message.
  * The reaction is to update our key to the new
  * value.  (Rekeying).
- */ 
+ */
 static int acceptSessionKeyUpdate(const PeerIdentity * sender,
                                  const p2p_HEADER * msg) {
   LOG(LOG_WARNING,

Modified: GNUnet/src/applications/session/sessiontest.c
===================================================================
--- GNUnet/src/applications/session/sessiontest.c       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/session/sessiontest.c       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/session/sessiontest.c 
+ * @file applications/session/sessiontest.c
  * @brief Session establishment testcase
  * @author Christian Grothoff
  */
@@ -58,7 +58,7 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return 0: ok, -1: error
- */   
+ */
 int main(int argc, char ** argv) {
   pid_t daemon1;
   pid_t daemon2;
@@ -72,7 +72,7 @@
                         "5B2Q58IEU1VF5FTR838449CSHVBOAHLDVQAOA33O77F"
                         "OPDA8F1VIKESLSNBO",
                         &peer2.hashPubKey));
-  daemon1 = fork(); 
+  daemon1 = fork();
   if (daemon1 == 0) {
     if (0 != execlp("gnunetd", /* what binary to execute, must be in $PATH! */
                    "gnunetd", /* arg0, path to gnunet binary */
@@ -109,18 +109,18 @@
   if (daemon1 != -1) {
     if (0 != kill(daemon1, SIGTERM))
       DIE_STRERROR("kill");
-    if (daemon1 != waitpid(daemon1, &status, 0)) 
+    if (daemon1 != waitpid(daemon1, &status, 0))
       DIE_STRERROR("waitpid");
   }
   if (daemon2 != -1) {
     if (0 != kill(daemon2, SIGTERM))
       DIE_STRERROR("kill");
-    if (daemon2 != waitpid(daemon2, &status, 0)) 
+    if (daemon2 != waitpid(daemon2, &status, 0))
       DIE_STRERROR("waitpid");
   }
 
   /* re-start, this time we're sure up-to-date HELOs are available */
-  daemon1 = fork(); 
+  daemon1 = fork();
   if (daemon1 == 0) {
     if (0 != execlp("gnunetd", /* what binary to execute, must be in $PATH! */
                    "gnunetd", /* arg0, path to gnunet binary */
@@ -175,7 +175,7 @@
   while (OK == requestStatistics(sock,
                                 &waitForConnect,
                                 NULL)) {
-    printf(_("Waiting for peers to connect (%u iterations left)...\n"), 
+    printf(_("Waiting for peers to connect (%u iterations left)...\n"),
           left);
     sleep(5);
     left--;
@@ -191,16 +191,16 @@
   if (daemon1 != -1) {
     if (0 != kill(daemon1, SIGTERM))
       DIE_STRERROR("kill");
-    if (daemon1 != waitpid(daemon1, &status, 0)) 
+    if (daemon1 != waitpid(daemon1, &status, 0))
       DIE_STRERROR("waitpid");
   }
   if (daemon2 != -1) {
     if (0 != kill(daemon2, SIGTERM))
       DIE_STRERROR("kill");
-    if (daemon2 != waitpid(daemon2, &status, 0)) 
+    if (daemon2 != waitpid(daemon2, &status, 0))
       DIE_STRERROR("waitpid");
   }
   return ret;
 }
 
-/* end of sessiontest.c */ 
+/* end of sessiontest.c */

Modified: GNUnet/src/applications/sqstore_mysql/mysql.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysql.c       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/sqstore_mysql/mysql.c       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -32,13 +32,13 @@
  * Pros
  * + On up-to-date hardware where mysql can be used comfortably, this
  *   module will have better performance than the other db choices
- *   (according to our tests). 
- * + Its often possible to recover the mysql database from internal 
- *   inconsistencies. The other db choices do not support repair 
- *   (gnunet-check cannot fix problems internal to the dbmgr!). 
- *   For example, we have seen several cases where power failure 
- *   has ruined a gdbm database beyond repair. 
- * Cons 
+ *   (according to our tests).
+ * + Its often possible to recover the mysql database from internal
+ *   inconsistencies. The other db choices do not support repair
+ *   (gnunet-check cannot fix problems internal to the dbmgr!).
+ *   For example, we have seen several cases where power failure
+ *   has ruined a gdbm database beyond repair.
+ * Cons
  * - Memory usage (Comment: "I have 1G and it never caused me trouble")
  * - Manual setup
  *
@@ -49,14 +49,14 @@
  *
  *     sqstore = "sqstore_mysql"
  *
- *    </pre>  
+ *    </pre>
  * 2) Then access mysql as root,
  *    <pre>
  *
- *    # mysql -u root -p 
- * 
+ *    # mysql -u root -p
+ *
  *    </pre>
- *    and do the following. [You should replace $USER with the username 
+ *    and do the following. [You should replace $USER with the username
  *    that will be running the gnunetd process].
  *    <pre>
  *
@@ -67,71 +67,71 @@
       FLUSH PRIVILEGES;
  *
  *    </pre>
- * 3) In the $HOME directory of $USER, create a ".my.cnf" file 
+ * 3) In the $HOME directory of $USER, create a ".my.cnf" file
  *    with the following lines
  *    <pre>
- 
+
       [client]
       user=$USER
       password=$the_password_you_like
-    
+
  *    </pre>
  *
  * Thats it. Note that .my.cnf file is a security risk unless its on
  * a safe partition etc. The $HOME/.my.cnf can of course be a symbolic
- * link. Even greater security risk can be achieved by setting no 
- * password for $USER.  Luckily $USER has only priviledges to mess 
- * up GNUnet's tables, nothing else (unless you give him more, 
+ * link. Even greater security risk can be achieved by setting no
+ * password for $USER.  Luckily $USER has only priviledges to mess
+ * up GNUnet's tables, nothing else (unless you give him more,
  * of course).<p>
  *
- * 4) Still, perhaps you should briefly try if the DB connection 
+ * 4) Still, perhaps you should briefly try if the DB connection
  *    works. First, login as $USER. Then use,
  *
  *    <pre>
  *    # mysql -u $USER
  *    mysql> use gnunet;
  *    </pre>
- *    
+ *
  *    If you get the message &quot;Database changed&quot; it probably works.
- * 
- *    [If you get &quot;ERROR 2002: Can't connect to local MySQL server 
+ *
+ *    [If you get &quot;ERROR 2002: Can't connect to local MySQL server
  *     through socket '/tmp/mysql.sock' (2)&quot; it may be resolvable by
  *     &quot;ln -s /var/run/mysqld/mysqld.sock /tmp/mysql.sock&quot;
  *     so there may be some additional trouble depending on your mysql setup.]
  *
- * REPAIRING TABLES 
+ * REPAIRING TABLES
  *
  * - Its probably healthy to check your tables for inconsistencies
  *   every now and then.
  * - If you get odd SEGVs on gnunetd startup, it might be that the mysql
- *   databases have been corrupted. 
+ *   databases have been corrupted.
  * - The tables can be verified/fixed in two ways;
- *   1) by shutting down mysqld (mandatory!) and running 
- *   # myisamchk -r *.MYI 
+ *   1) by shutting down mysqld (mandatory!) and running
+ *   # myisamchk -r *.MYI
  *   in /var/lib/mysql/gnunet/ (or wherever the tables are stored).
  *   Another repair command is "mysqlcheck". The usable command
  *   may depend on your mysql build/version. Or,
- *   2) by executing 
+ *   2) by executing
  *   mysql> REPAIR TABLE gn070;
  *
  * EFFICIENCY ISSUES
  *
- * If you suffer from too slow index/insert speeds, 
+ * If you suffer from too slow index/insert speeds,
  * you might try to define /etc/gnunet.conf option
  *
  *   [MYSQL]
  *   DELAYED = YES
  *
- * for small efficiency boost. The option will let MySQL bundle multiple 
- * inserts before actually writing them to disk. You shouldn't use this 
- * option unless you're an (my)sql expert and really know what you're doing. 
+ * for small efficiency boost. The option will let MySQL bundle multiple
+ * inserts before actually writing them to disk. You shouldn't use this
+ * option unless you're an (my)sql expert and really know what you're doing.
  * Especially, if you run into any trouble due to this, you're on your own.
  *
  * PROBLEMS?
  *
- * If you have problems related to the mysql module, your best 
- * friend is probably the mysql manual. The first thing to check 
- * is that mysql is basically operational, that you can connect 
+ * If you have problems related to the mysql module, your best
+ * friend is probably the mysql manual. The first thing to check
+ * is that mysql is basically operational, that you can connect
  * to it, create tables, issue queries etc.
  *
  */
@@ -165,12 +165,12 @@
  * @brief mysql wrapper
  */
 typedef struct {
-  MYSQL * dbf; 
+  MYSQL * dbf;
   Mutex DATABASE_Lock_;
-  int avgLength_ID;       /* which column contains the Avg_row_length  
+  int avgLength_ID;       /* which column contains the Avg_row_length
                             * in SHOW TABLE STATUS resultset */
   int useDelayed;          /* use potentially unsafe delayed inserts? */
-  char * cnffile;  
+  char * cnffile;
   MYSQL_STMT * insert;
   MYSQL_BIND bind[7];
   MYSQL_STMT * select;
@@ -178,7 +178,7 @@
   MYSQL_STMT * selects;
   MYSQL_STMT * selectsc;
   MYSQL_BIND sbind[2];
-  
+
 } mysqlHandle;
 
 #define INSERT_SAMPLE "INSERT INTO gn070 
(size,type,prio,anonLevel,expire,hash,value) VALUES (?,?,?,?,?,?,?)"
@@ -192,7 +192,7 @@
 static mysqlHandle * dbh;
 
 /**
- * Given a full (SELECT *) sql_row from gn070 table in database 
+ * Given a full (SELECT *) sql_row from gn070 table in database
  * order, assemble it into a Datastore_Datum representation.
  *
  */
@@ -205,12 +205,12 @@
   unsigned int prio;
   unsigned int level;
   unsigned long long exp;
-  
+
   contentSize = atol(sql_row[0]) - sizeof(Datastore_Value);
   if (contentSize < 0)
     return NULL; /* error */
 
-  lens = mysql_fetch_lengths(res); 
+  lens = mysql_fetch_lengths(res);
   if ( (lens[5] != sizeof(HashCode512)) ||
        (lens[6] != contentSize) ||
        (sscanf(sql_row[1], "%u", &type) != 1) ||
@@ -230,15 +230,15 @@
   datum->value.expirationTime = htonll(exp);
   memcpy(&datum->key,
         sql_row[5],
-        sizeof(HashCode512)); 
-  memcpy(&datum[1], 
+        sizeof(HashCode512));
+  memcpy(&datum[1],
          sql_row[6],
         contentSize);
   return datum;
 }
 
 /**
- * Initiate the database connection.  
+ * Initiate the database connection.
  * Uses dbhI->cnffile for the configuration,
  * so that must be set already.
  * @return OK on success
@@ -250,12 +250,12 @@
     return SYSERR;
   dbhI->dbf = mysql_init(NULL);
   if (dbhI->dbf == NULL)
-    return SYSERR;  
+    return SYSERR;
   mysql_options(dbhI->dbf,
                MYSQL_READ_DEFAULT_FILE,
                dbh->cnffile);
-  mysql_options(dbhI->dbf, 
-               MYSQL_READ_DEFAULT_GROUP, 
+  mysql_options(dbhI->dbf,
+               MYSQL_READ_DEFAULT_GROUP,
                "client");
   dbname = getConfigurationString("MYSQL",
                                  "DATABASE");
@@ -271,7 +271,7 @@
                     0);
   FREE(dbname);
   if (mysql_error(dbhI->dbf)[0]) {
-    LOG_MYSQL(LOG_ERROR, 
+    LOG_MYSQL(LOG_ERROR,
              "mysql_real_connect",
              dbhI);
     dbhI->dbf = NULL;
@@ -284,7 +284,7 @@
              " type INT(11) NOT NULL DEFAULT 0,"
              " prio INT(11) NOT NULL DEFAULT 0,"
              " anonLevel INT(11) NOT NULL DEFAULT 0,"
-             " expire BIGINT NOT NULL DEFAULT 0," 
+             " expire BIGINT NOT NULL DEFAULT 0,"
              " hash TINYBLOB BINARY NOT NULL DEFAULT '',"
              " value BLOB NOT NULL DEFAULT '',"
              " INDEX (hash(64)),"
@@ -292,7 +292,7 @@
              " INDEX (expire)"
              ") TYPE=MyISAM");
   if (mysql_error(dbhI->dbf)[0]) {
-    LOG_MYSQL(LOG_ERROR, 
+    LOG_MYSQL(LOG_ERROR,
              "mysql_query",
              dbhI);
     mysql_close(dbhI->dbf);
@@ -309,7 +309,7 @@
        (dbhI->select == NULL) ||
        (dbhI->selectc == NULL) ||
        (dbhI->selects == NULL) ||
-       (dbhI->selectsc == NULL) ) {       
+       (dbhI->selectsc == NULL) ) {
     BREAK();
     if (dbhI->insert != NULL)
       mysql_stmt_close(dbhI->insert);
@@ -322,15 +322,15 @@
     if (dbhI->selectsc != NULL)
       mysql_stmt_close(dbhI->selectsc);
     mysql_close(dbhI->dbf);
-    dbhI->dbf = NULL;    
+    dbhI->dbf = NULL;
     return SYSERR;
   }
   if (mysql_stmt_prepare(dbhI->insert,
                         dbh->useDelayed
                         ? INSERT_SAMPLE_DELAYED
                         : INSERT_SAMPLE,
-                        strlen(dbh->useDelayed 
-                               ? INSERT_SAMPLE_DELAYED 
+                        strlen(dbh->useDelayed
+                               ? INSERT_SAMPLE_DELAYED
                                : INSERT_SAMPLE)) ||
       mysql_stmt_prepare(dbhI->select,
                         SELECT_SAMPLE,
@@ -351,7 +351,7 @@
        mysql_stmt_error(dbhI->insert));
     mysql_stmt_close(dbhI->insert);
     mysql_close(dbhI->dbf);
-    dbhI->dbf = NULL;    
+    dbhI->dbf = NULL;
     return SYSERR;
   }
   memset(dbhI->bind,
@@ -369,7 +369,7 @@
         sizeof(dbhI->sbind));
   dbhI->sbind[0].buffer_type = MYSQL_TYPE_TINY_BLOB; /* hash */
   dbhI->sbind[1].buffer_type = MYSQL_TYPE_LONG; /* type */
-  
+
   MUTEX_CREATE(&dbhI->DATABASE_Lock_);
   return OK;
 }
@@ -426,11 +426,11 @@
   if (type==0) {
     typestr[0] = 0;
   } else {
-    SNPRINTF(typestr, 
+    SNPRINTF(typestr,
              32,
              "WHERE type=%u", type);
   }
-  
+
   scratch = MALLOC(256);
   SNPRINTF(scratch,
           256,
@@ -438,29 +438,29 @@
           " %s"
           " ORDER BY prio ASC",
           typestr);
-  mysql_query(dbhI.dbf, 
+  mysql_query(dbhI.dbf,
              scratch);
   FREE(scratch);
   if (mysql_error(dbhI.dbf)[0]) {
     LOG_MYSQL(LOG_ERROR, "mysql_query", &dbhI);
-    MUTEX_UNLOCK(&dbhI.DATABASE_Lock_);  
+    MUTEX_UNLOCK(&dbhI.DATABASE_Lock_);
     iclose(&dbhI);
     return(SYSERR);
   }
-  
+
   if (!(sql_res=mysql_use_result(dbhI.dbf))) {
     MUTEX_UNLOCK(&dbhI.DATABASE_Lock_);
     iclose(&dbhI);
     return(SYSERR);
   }
 
-  while ((sql_row=mysql_fetch_row(sql_res))) {   
+  while ((sql_row=mysql_fetch_row(sql_res))) {
     datum = assembleDatum(sql_res,
                          sql_row);
     if (datum == NULL) {
       LOG(LOG_WARNING,
          _("Invalid data in MySQL database.  Please verify integrity!\n"));
-      continue; 
+      continue;
     }
     if ( (iter != NULL) &&
         (SYSERR == iter(&datum->key, &datum->value, closure) ) ) {
@@ -479,9 +479,9 @@
   return count;
 }
 
-  
 
 
+
 /**
  * Iterate over the items in the datastore in ascending
  * order of expiration time.
@@ -500,7 +500,7 @@
   Datastore_Datum * datum;
   char * scratch;
   char typestr[32];
-  int count = 0;   
+  int count = 0;
   mysqlHandle dbhI;
 
   dbhI.cnffile = dbh->cnffile; /* shared */
@@ -511,11 +511,11 @@
   if (type==0) {
     typestr[0] = 0;
   } else {
-    SNPRINTF(typestr, 
+    SNPRINTF(typestr,
              32,
             "WHERE type=%u", type);
   }
-  
+
   scratch = MALLOC(256);
   SNPRINTF(scratch,
           256,
@@ -523,7 +523,7 @@
           " %s"
           " ORDER BY expire ASC",
           typestr);
-  mysql_query(dbhI.dbf, 
+  mysql_query(dbhI.dbf,
              scratch);
   FREE(scratch);
   if (mysql_error(dbhI.dbf)[0]) {
@@ -532,20 +532,20 @@
     iclose(&dbhI);
     return(SYSERR);
   }
-  
+
   if (!(sql_res=mysql_use_result(dbhI.dbf))) {
     MUTEX_UNLOCK(&dbhI.DATABASE_Lock_);
     iclose(&dbhI);
     return(SYSERR);
   }
 
-  while ((sql_row=mysql_fetch_row(sql_res))) {   
+  while ((sql_row=mysql_fetch_row(sql_res))) {
     datum = assembleDatum(sql_res,
                          sql_row);
     if (datum == NULL) {
       LOG(LOG_WARNING,
          _("Invalid data in MySQL database.  Please verify integrity!\n"));
-      continue; 
+      continue;
     }
     if ( (iter != NULL) &&
         (SYSERR == iter(&datum->key, &datum->value, closure) ) ) {
@@ -577,25 +577,25 @@
  *   iter is non-NULL and aborted the iteration
  */
 static int getOLD(const HashCode512 * query,
-              unsigned int type,            
+              unsigned int type,       
               Datum_Iterator iter,
               void * closure) {
   MYSQL_RES * sql_res;
-  MYSQL_ROW sql_row;  
+  MYSQL_ROW sql_row;
   int count;
   Datastore_Datum * datum;
   char * escapedHash;
   char * scratch;
   size_t n;
 
-  if (query == NULL) 
+  if (query == NULL)
     return iterateLowPriority(type, iter, closure);
 
   MUTEX_LOCK(&dbh->DATABASE_Lock_);
   escapedHash = MALLOC(2*sizeof(HashCode512)+1);
   mysql_real_escape_string(dbh->dbf,
-                          escapedHash, 
-                          (char *) query, 
+                          escapedHash,
+                          (char *) query,
                           sizeof(HashCode512));
   n = sizeof(HashCode512)*2+400+1;
   scratch = MALLOC(n);
@@ -624,7 +624,7 @@
               n,
               "SELECT * FROM gn070 WHERE hash='%s'",
               escapedHash);
-  }    
+  }
   FREE(escapedHash);
   mysql_query(dbh->dbf, scratch);
   FREE(scratch);
@@ -639,16 +639,16 @@
     return SYSERR;
   }
   count = 0;
-  while ((sql_row=mysql_fetch_row(sql_res))) {   
+  while ((sql_row=mysql_fetch_row(sql_res))) {
     datum = assembleDatum(sql_res,
                          sql_row);
     if (datum == NULL) {
       LOG(LOG_WARNING,
          _("Invalid data in MySQL database.  Please verify integrity!\n"));
-      continue; 
+      continue;
     }
     if ( (iter != NULL) &&
-        (SYSERR == iter(&datum->key, 
+        (SYSERR == iter(&datum->key,
                         &datum->value,
                         closure) ) ) {
       count = SYSERR;
@@ -660,7 +660,7 @@
   }            
   mysql_free_result(sql_res);
   MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
- 
+
   return count;
 }
 #endif
@@ -677,7 +677,7 @@
  *   iter is non-NULL and aborted the iteration
  */
 static int get(const HashCode512 * query,
-              unsigned int type,            
+              unsigned int type,       
               Datum_Iterator iter,
               void * closure) {
   MYSQL_RES * sql_res;
@@ -695,7 +695,7 @@
   unsigned long hashSize;
   EncName enc;
 
-  if (query == NULL) 
+  if (query == NULL)
     return iterateLowPriority(type, iter, closure);
 
   IFLOG(LOG_DEBUG,
@@ -716,7 +716,7 @@
       stmt = dbh->selectc;
     else
       stmt = dbh->select;
-  }    
+  }
   hashSize = sizeof(HashCode512);
   dbh->sbind[0].buffer = (char*) query;
   dbh->sbind[1].buffer = (char*) &type;
@@ -728,7 +728,7 @@
        _("'%s' failed at %s:%d with error: %s\n"),
        "mysql_stmt_result_metadata",
        __FILE__, __LINE__,
-       mysql_stmt_error(stmt));    
+       mysql_stmt_error(stmt));
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
     return SYSERR;
   }
@@ -743,21 +743,21 @@
        _("'%s' failed at %s:%d with error: %s\n"),
        "mysql_stmt_bind_param",
        __FILE__, __LINE__,
-       mysql_stmt_error(stmt));    
+       mysql_stmt_error(stmt));
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
     return SYSERR;
-  } 
+  }
   if (mysql_stmt_execute(stmt)) {
     LOG(LOG_ERROR,
        _("'%s' failed at %s:%d with error: %s\n"),
        "mysql_stmt_execute",
        __FILE__, __LINE__,
-       mysql_stmt_error(stmt));    
+       mysql_stmt_error(stmt));
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
     return SYSERR;
-  }  
-  
-  datum = MALLOC(sizeof(Datastore_Value) + MAX_DATUM_SIZE);  
+  }
+
+  datum = MALLOC(sizeof(Datastore_Value) + MAX_DATUM_SIZE);
   twenty = sizeof(HashCode512);
   dbh->bind[0].buffer = (char*) &size;
   dbh->bind[1].buffer = (char*) &rtype;
@@ -776,7 +776,7 @@
        _("'%s' failed at %s:%d with error: %s\n"),
        "mysql_stmt_bind_result",
        __FILE__, __LINE__,
-       mysql_stmt_error(stmt));    
+       mysql_stmt_error(stmt));
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
     FREE(datum);
     return SYSERR;
@@ -786,7 +786,7 @@
                _("'%s' failed at %s:%d with error: %s\n"),
                "mysql_stmt_store_result",
                __FILE__, __LINE__,
-               mysql_stmt_error(stmt));    
+               mysql_stmt_error(stmt));
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
     FREE(datum);
     return SYSERR;
@@ -795,14 +795,14 @@
   count = 0;
   while (! mysql_stmt_fetch(stmt)) {
     count++;
-    
+
     if (twenty != sizeof(HashCode512)) {
       BREAK();
       LOG(LOG_WARNING,
          _("Invalid data in MySQL database.  Please verify integrity!\n"));
       twenty = sizeof(HashCode512);
-      datasize = MAX_DATUM_SIZE;      
-      continue; 
+      datasize = MAX_DATUM_SIZE;
+      continue;
     }
     if (iter != NULL) {
       datum->size = htonl(size);
@@ -814,33 +814,33 @@
        BREAK();
        LOG(LOG_WARNING,
            _("Invalid data in MySQL database.  Please verify integrity!\n"));
-       datasize = MAX_DATUM_SIZE;      
-       continue; 
+       datasize = MAX_DATUM_SIZE;
+       continue;
       }
       LOG(LOG_DEBUG,
          "Found in database block with type %u.\n",
          ntohl(*(int*)&datum[1]));
-      
+
       if( SYSERR == iter(&key,
-                        datum, 
+                        datum,
                         closure) ) {
         count = SYSERR;
        break;
-      } 
+      }
     }
-    datasize = MAX_DATUM_SIZE;      
+    datasize = MAX_DATUM_SIZE;
   }
   if (mysql_stmt_errno(stmt)) {
     LOG(LOG_ERROR,
        _("'%s' failed at %s:%d with error: %s\n"),
        "mysql_stmt_fetch",
        __FILE__, __LINE__,
-       mysql_stmt_error(stmt));    
+       mysql_stmt_error(stmt));
   }
   mysql_free_result(sql_res);
   FREE(datum);
   MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
-  
+
   IFLOG(LOG_DEBUG,
        hash2enc(query,
                 &enc));
@@ -856,7 +856,7 @@
        &enc,
        type);
   }
-      
+
   return count;
 }
 
@@ -865,7 +865,7 @@
  *
  * @return OK on success, SYSERR on error
  */
-static int put(const HashCode512 * key, 
+static int put(const HashCode512 * key,
               const Datastore_Value * value) {
   unsigned long contentSize;
   unsigned long hashSize;
@@ -873,7 +873,7 @@
   unsigned int type;
   unsigned int prio;
   unsigned int level;
-  unsigned long long expiration;  
+  unsigned long long expiration;
   EncName enc;
 
   if ( (ntohl(value->size) <= sizeof(Datastore_Value)) ) {
@@ -881,7 +881,7 @@
     return SYSERR;
   }
   MUTEX_LOCK(&dbh->DATABASE_Lock_);
-  
+
   contentSize = ntohl(value->size)-sizeof(Datastore_Value);
   hashSize = sizeof(HashCode512);
 
@@ -892,7 +892,7 @@
   expiration = ntohll(value->expirationTime);
 
   IFLOG(LOG_DEBUG,
-       hash2enc(key, 
+       hash2enc(key,
                 &enc));
   LOG(LOG_DEBUG,
       "Storing in database block with type %u and key %s.\n",
@@ -914,33 +914,33 @@
        _("'%s' failed at %s:%d with error: %s\n"),
        "mysql_stmt_bind_param",
        __FILE__, __LINE__,
-       mysql_stmt_error(dbh->insert));    
+       mysql_stmt_error(dbh->insert));
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
     return SYSERR;
-  } 
+  }
 
   if (mysql_stmt_execute(dbh->insert)) {
     LOG(LOG_ERROR,
        _("'%s' failed at %s:%d with error: %s\n"),
        "mysql_stmt_execute",
        __FILE__, __LINE__,
-       mysql_stmt_error(dbh->insert));    
+       mysql_stmt_error(dbh->insert));
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
     return SYSERR;
-  }  
+  }
   MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
   return OK;
 }
 
 /**
  * Delete an item from the datastore.
- *   
+ *
  * @param value maybe NULL, then all items under the
  *        given key are deleted
  * @return the number of items deleted, 0 if
  *        none were found, SYSERR on errors
  */
-static int del(const HashCode512 * key, 
+static int del(const HashCode512 * key,
               const Datastore_Value * value) {
   char * escapedHash;
   char * escapedBlock;
@@ -949,9 +949,9 @@
   int count;
   int contentSize;
   EncName enc;
-  
+
   IFLOG(LOG_DEBUG,
-       hash2enc(key, 
+       hash2enc(key,
                 &enc));
   LOG(LOG_DEBUG,
       "MySQL is executing deletion request for content of query '%s' and type 
%u\n",
@@ -962,7 +962,7 @@
     contentSize = ntohl(value->size)-sizeof(Datastore_Value);
     escapedBlock = MALLOC(2*contentSize+1);
     mysql_real_escape_string(dbh->dbf,
-                            escapedBlock, 
+                            escapedBlock,
                             (char *)&value[1],
                             contentSize);
   } else {
@@ -972,13 +972,13 @@
 
   escapedHash = MALLOC(2*sizeof(HashCode512)+1);
   mysql_real_escape_string(dbh->dbf,
-                          escapedHash, 
-                          (char *)key, 
+                          escapedHash,
+                          (char *)key,
                           sizeof(HashCode512));
   n = sizeof(HashCode512)*2+contentSize*2+400+1;
   scratch = MALLOC(n);
   if(value == NULL) {
-    SNPRINTF(scratch, 
+    SNPRINTF(scratch,
             n,
             "DELETE FROM gn070 WHERE hash='%s' ORDER BY prio ASC LIMIT 1",     
             escapedHash);
@@ -986,7 +986,7 @@
     /* FIXME: type/prio/anon=%d since the value is a
        signed int here; it would be clean(er) if
        we were to use prepared statements here, too */
-    SNPRINTF(scratch, 
+    SNPRINTF(scratch,
             n,
             "DELETE FROM gn070 WHERE hash='%s'"
             " AND size=%u AND type=%d AND prio=%d"
@@ -996,7 +996,7 @@
             ntohl(value->size),
             ntohl(value->type),
             ntohl(value->prio),
-            ntohl(value->anonymityLevel), 
+            ntohl(value->anonymityLevel),
             ntohll(value->expirationTime),
             escapedBlock);
   }
@@ -1005,8 +1005,8 @@
   FREENONNULL(escapedBlock);
   FREE(scratch);
   if(mysql_error(dbh->dbf)[0]) {
-    LOG_MYSQL(LOG_ERROR, 
-             "mysql_query", 
+    LOG_MYSQL(LOG_ERROR,
+             "mysql_query",
              dbh);
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
     return SYSERR;
@@ -1032,23 +1032,23 @@
   char * scratch;
   int n;
   int contentSize;
-  
+
   MUTEX_LOCK(&dbh->DATABASE_Lock_);
   contentSize = ntohl(value->size)-sizeof(Datastore_Value);
 
   escapedHash = MALLOC(2*sizeof(HashCode512)+1);
-  mysql_escape_string(escapedHash, 
-                     (char *)key, 
+  mysql_escape_string(escapedHash,
+                     (char *)key,
                      sizeof(HashCode512));
   escapedBlock = MALLOC(2*contentSize+1);
-  mysql_escape_string(escapedBlock, 
+  mysql_escape_string(escapedBlock,
                      (char *)&value[1],
                      contentSize);
   n = contentSize*2+sizeof(HashCode512)*2+100+1;
   scratch = MALLOC(n);
- 
+
   /* NOTE: as the table entry for 'prio' is defined as unsigned,
-   * mysql will zero the value if its about to go negative. (This 
+   * mysql will zero the value if its about to go negative. (This
    * will generate a warning though, but its probably not seen
    * at all in this context.)
    */
@@ -1057,11 +1057,11 @@
           "UPDATE gn070"
           " SET prio=prio+%d"
           " WHERE hash='%s'"
-          " AND value='%s'", 
+          " AND value='%s'",
           delta,
           escapedHash,
           escapedBlock);
-  mysql_query(dbh->dbf, 
+  mysql_query(dbh->dbf,
              scratch);
   FREE(scratch);
   FREE(escapedHash);
@@ -1071,7 +1071,7 @@
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
     return(SYSERR);
   }
-  
+
   MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
   return OK;
 }
@@ -1104,20 +1104,20 @@
     int rows = mysql_num_fields(sql_res);
     sql_row = mysql_fetch_row(sql_res);
     if (sql_row == NULL) {
-      LOG(LOG_ERROR, 
-         _("Query '%s' had no results.\n"), 
+      LOG(LOG_ERROR,
+         _("Query '%s' had no results.\n"),
          "SHOW TABLE STATUS FROM gnunet LIKE 'gn070'");
       GNUNET_ASSERT(0); /* not allowed to fail*/
       MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
       return SYSERR;   /* shouldn't get here */
     }
     GNUNET_ASSERT( (dbh->avgLength_ID < rows) &&
-                  (dbh->avgLength_ID >= 0) ); 
-    if (sql_row[dbh->avgLength_ID] != NULL) 
+                  (dbh->avgLength_ID >= 0) );
+    if (sql_row[dbh->avgLength_ID] != NULL)
       avgRowLen = atoll(sql_row[dbh->avgLength_ID]);
     else
       avgRowLen = -1;
-    
+
     mysql_free_result(sql_res);
   }
   GNUNET_ASSERT(avgRowLen >= 0);
@@ -1138,13 +1138,13 @@
       rowsInTable = 0;
   }
   mysql_free_result(sql_res);
-     
+
   MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
 
   bytesUsed = rowsInTable * avgRowLen;
 
 #if DEBUG_MYSQL
-  LOG(LOG_DEBUG, 
+  LOG(LOG_DEBUG,
       "estimateContentAvailable (q=%d)\n",
       kbUsed);
 #endif
@@ -1178,7 +1178,7 @@
   /* verify that .my.cnf can be found */
 #ifndef WINDOWS
   pw = getpwuid(getuid());
-  if(!pw) 
+  if(!pw)
     DIE_STRERROR("getpwuid");
   home_dir = pw->pw_dir;
 #else
@@ -1191,13 +1191,13 @@
   if (cnffile == NULL) {
     cnffile = MALLOC(nX);
     SNPRINTF(cnffile, nX, "%s/.my.cnf", home_dir);
-  } 
+  }
 #ifdef WINDOWS
   FREE(home_dir);
 #endif
-  LOG(LOG_DEBUG, 
+  LOG(LOG_DEBUG,
       _("Trying to use file '%s' for MySQL configuration.\n"),
-      cnffile); 
+      cnffile);
   fp = FOPEN(cnffile, "r");
   if (!fp) {
     LOG_FILE_STRERROR(LOG_ERROR, "fopen", cnffile);
@@ -1228,7 +1228,7 @@
   mysql_query(dbh->dbf,
              "SHOW TABLE STATUS FROM gnunet LIKE 'gn070'");
   if (mysql_error(dbh->dbf)[0]) {
-    LOG_MYSQL(LOG_ERROR, 
+    LOG_MYSQL(LOG_ERROR,
              "mysql_query",
              dbh);
     iclose(dbh);
@@ -1250,7 +1250,7 @@
       FREE(cnffile);
       return NULL;
     }
-    sql_fields=mysql_fetch_fields(sql_res); 
+    sql_fields=mysql_fetch_fields(sql_res);
     if(sql_fields==NULL) {
       LOG(LOG_ERROR, "ERROR: sql_fields==0\n");
       iclose(dbh);

Modified: GNUnet/src/applications/sqstore_mysql/mysqltest.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysqltest.c   2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/sqstore_mysql/mysqltest.c   2005-03-20 23:54:53 UTC 
(rev 464)
@@ -43,7 +43,7 @@
     ret = OK;
   } else {
     fprintf(stderr, "Invalid value!\n");
-    ret = SYSERR;                
+    ret = SYSERR;              
   }
   FREE(value);
   return ret;
@@ -55,7 +55,7 @@
   int ret;
 
   ret = checkValue(key, val, closure);
-  (*closure) += 2;  
+  (*closure) += 2;
   return ret;
 }
 
@@ -65,7 +65,7 @@
   int ret;
 
   ret = checkValue(key, val, closure);
-  (*closure) += 1;  
+  (*closure) += 1;
   return ret;
 }
 
@@ -74,7 +74,7 @@
                       int * closure) {
   int ret;
 
-  (*closure) -= 2;  
+  (*closure) -= 2;
   ret = checkValue(key, val, closure);
   return ret;
 }
@@ -102,9 +102,9 @@
                      ntohl(val->size)) ) )
       return SYSERR; /* duplicate! */
     FREE(*last);
-  } 
+  }
   *last = MALLOC(ntohl(val->size));
-  memcpy(*last, 
+  memcpy(*last,
         val,
         ntohl(val->size));
   return OK;
@@ -137,13 +137,13 @@
                                        (Datum_Iterator) &iterateUp1,
                                        &i));
   for (i=255;i>=0;i--) {
-    memset(&key, 256-i, sizeof(HashCode512));     
+    memset(&key, 256-i, sizeof(HashCode512));
     ASSERT(1 == api->get(&key, i+1, &checkValue, &i));
   }
 
   oldSize = api->getSize();
   for (i=255;i>=0;i-=2) {
-    memset(&key, 256-i, sizeof(HashCode512)); 
+    memset(&key, 256-i, sizeof(HashCode512));
     value = initValue(i+1);
     ASSERT(1 == api->del(&key, value));
     FREE(value);
@@ -159,7 +159,7 @@
                                           &i));
   ASSERT(0 == i);
   for (i=254;i>=0;i-=2) {
-    memset(&key, 256-i, sizeof(HashCode512)); 
+    memset(&key, 256-i, sizeof(HashCode512));
     value = initValue(i+1);
     ASSERT(1 == api->del(&key, value));
     FREE(value);
@@ -172,14 +172,14 @@
   api->put(&key, value);
   ASSERT(1 == api->iterateExpirationTime(ANY_BLOCK,
                                         (Datum_Iterator) &priorityCheck,
-                                        &i));  
+                                        &i));
   api->update(&key,
              value,
              4);
   i += 4;
   ASSERT(1 == api->iterateExpirationTime(ANY_BLOCK,
                                         (Datum_Iterator) &priorityCheck,
-                                        &i));  
+                                        &i));
   FREE(value);
 
   /* test multiple results */
@@ -190,7 +190,7 @@
   value = NULL;
   ASSERT(2 == api->iterateExpirationTime(ANY_BLOCK,
                                         (Datum_Iterator) &multipleCheck,
-                                        &value));  
+                                        &value));
   FREE(value);
   api->del(&key,
           NULL);
@@ -198,8 +198,8 @@
           NULL);
   ASSERT(0 == api->iterateExpirationTime(ANY_BLOCK,
                                         NULL,
-                                        NULL));  
-  
+                                        NULL));
+
   api->drop();
   return OK;
  FAILURE:
@@ -208,9 +208,9 @@
 }
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parser(int argc, 
+static int parser(int argc,
                  char * argv[]) {
   FREENONNULL(setConfigurationString("GNUNETD",
                                     "_MAGIC_",
@@ -242,21 +242,21 @@
   initCore();
   api = requestService("sqstore_mysql");
   ok = SYSERR;
-  if (api != NULL) {   
+  if (api != NULL) {
     api->drop();
-    releaseService(api);  
-    api = requestService("sqstore_mysql");    
+    releaseService(api);
+    api = requestService("sqstore_mysql");
     if (api != NULL) {
       ok = test(api);
       releaseService(api);
-    }  
+    }
   }
   doneCore();
   doneUtil();
-  if (ok == SYSERR) 
+  if (ok == SYSERR)
     return 1;
-  else 
-    return 0; 
+  else
+    return 0;
 }
 
 /* end of mysqltest.c */

Modified: GNUnet/src/applications/sqstore_sqlite/sqlite.c
===================================================================
--- GNUnet/src/applications/sqstore_sqlite/sqlite.c     2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/sqstore_sqlite/sqlite.c     2005-03-20 23:54:53 UTC 
(rev 464)
@@ -55,14 +55,14 @@
  * @brief SQLite wrapper
  */
 typedef struct {
-  sqlite3 *dbf; 
+  sqlite3 *dbf;
   Mutex DATABASE_Lock_;
   /** filename of this bucket */
-  char *fn;        
+  char *fn;
   /** bytes used */
-  double payload;          
+  double payload;
   unsigned int lastSync;
-  
+
   /** Precompiled SQL */
   sqlite3_stmt *exists, *countContent, *updPrio, *insertContent;
 } sqliteHandle;
@@ -86,7 +86,7 @@
  *
  * @return number of bytes used on disk
  */
-static unsigned long long getSize() {       
+static unsigned long long getSize() {
   double ret;
 
   MUTEX_LOCK(&dbh->DATABASE_Lock_);
@@ -96,7 +96,7 @@
   LOG(LOG_DEBUG,
       "SQLite: database size: %.0f\n",
       ret);
-#endif 
+#endif
   return ret;
 }
 
@@ -109,17 +109,17 @@
  * @param n size of in
  * @param out output
  */
-static int sqlite_encode_binary(const unsigned char *in, 
-                               int n, 
+static int sqlite_encode_binary(const unsigned char *in,
+                               int n,
                                unsigned char *out){
   char c;
   unsigned char *start = out;
-  
+
   n--;
   for (; n > -1; n--) {
     c = *in;
     in++;
-    
+
     if (c == 0 || c == 1) {
       *out = 1;
       out++;
@@ -130,7 +130,7 @@
     out++;
   }
   *out = 0;
-  
+
   return (int) (out - start);
 }
 
@@ -141,21 +141,21 @@
  * @param num size of the output buffer
  * @return number of output bytes, -1 on error
  */
-static int sqlite_decode_binary_n(const unsigned char *in, 
+static int sqlite_decode_binary_n(const unsigned char *in,
                                  unsigned char *out,
                                  unsigned int num){
   char c;
   unsigned char *start = out;
-  
+
   while((c = *in) && (out - start < num)) {
     if (c == 1) {
       in++;
       *out = *in - 1;
     } else
-      *out = c;    
+      *out = c;
     in++;
     out++;
-  } 
+  }
   return (int) (out - start);
 }
 
@@ -167,16 +167,16 @@
   Datastore_Datum * datum;
   Datastore_Value * value;
   int contentSize;
-    
+
   contentSize = sqlite3_column_int(stmt, 0) - sizeof(Datastore_Value);
-  
+
   if (contentSize < 0) {
     return NULL; /* error */
   }
-  
+
   if (sqlite3_column_bytes(stmt, 5) > sizeof(HashCode512) * 2 + 1 ||
       sqlite3_column_bytes(stmt, 6) > contentSize * 2 + 1) {
-    
+
     LOG(LOG_WARNING,
        _("SQL Database corrupt, ignoring result.\n"));
     return NULL;
@@ -189,18 +189,18 @@
   value->prio = htonl(sqlite3_column_int(stmt, 2));
   value->anonymityLevel = htonl(sqlite3_column_int(stmt, 3));
   value->expirationTime = htonll(sqlite3_column_int64(stmt, 4));
-  
+
   if (sqlite_decode_binary_n(sqlite3_column_blob(stmt, 5),
                             (char *) &datum->key,
                             sizeof(HashCode512)) != sizeof(HashCode512) ||
-      sqlite_decode_binary_n(sqlite3_column_blob(stmt, 6), 
-                            (char *) &value[1], 
+      sqlite_decode_binary_n(sqlite3_column_blob(stmt, 6),
+                            (char *) &value[1],
                             contentSize) != contentSize) {
-    
+
     LOG(LOG_WARNING,
        _("SQL Database corrupt, ignoring result.\n"));
     return NULL;
-  }  
+  }
   return datum;
 }
 
@@ -214,17 +214,17 @@
   int i;
   sqlite3_stmt *stmt;
   double ret = SYSERR;
-  
+
   i = sq_prepare("SELECT anonLevel FROM gn070 WHERE hash = ?",
                 &stmt);
   if (i == SQLITE_OK) {
-    sqlite3_bind_text(stmt, 
-                     1, 
+    sqlite3_bind_text(stmt,
+                     1,
                      key,
-                     strlen(key), 
+                     strlen(key),
                      SQLITE_STATIC);
     i = sqlite3_step(stmt);
-    
+
     if (i == SQLITE_DONE) {
       ret = 0;
       i = SQLITE_OK;
@@ -235,13 +235,13 @@
     }
   }
   sqlite3_finalize(stmt);
-  
+
   if (i != SQLITE_OK) {
-    LOG_SQLITE(LOG_ERROR, 
+    LOG_SQLITE(LOG_ERROR,
               "sqlite_getStat");
     return SYSERR;
   }
-  
+
   return ret;
 }
 
@@ -251,31 +251,31 @@
  * @param val value to set
  * @return SYSERR on error, OK otherwise
  */
-static int setStat(const char *key, 
+static int setStat(const char *key,
                   double val) {
   sqlite3_stmt *stmt;
-  
+
   if (sq_prepare("REPLACE INTO gn070(hash, anonLevel, type) VALUES (?, ?, ?)",
                 &stmt) == SQLITE_OK) {
     sqlite3_bind_text(stmt,
-                     1, 
+                     1,
                      key,
-                     strlen(key), 
+                     strlen(key),
                      SQLITE_STATIC);
     sqlite3_bind_double(stmt,
-                       2, 
+                       2,
                        val);
     sqlite3_bind_int(stmt,
                     3,
                     RESERVED_BLOCK);
     if (sqlite3_step(stmt) != SQLITE_DONE) {
-      LOG_SQLITE(LOG_ERROR, 
+      LOG_SQLITE(LOG_ERROR,
                 "sqlite_setStat");
       return SYSERR;
     }
     sqlite3_finalize(stmt);
-    
-    return OK;    
+
+    return OK;
   } else
     return SYSERR;
 }
@@ -284,14 +284,14 @@
  * @brief write all statistics to the db
  */
 static void syncStats() {
-  setStat("PAYLOAD", 
-         dbh->payload);  
+  setStat("PAYLOAD",
+         dbh->payload);
   dbh->lastSync = 0;
 }
 
 /**
  * Call a method for each key in the database and
- * call the callback method on it. 
+ * call the callback method on it.
  *
  * @param type entries of which type should be considered?
  *        Use 0 for any type.
@@ -300,9 +300,9 @@
  * @param sortByPriority 0 to order by expiration, 1 to order by prio
  * @return the number of items stored in the content database
  */
-static int sqlite_iterate(unsigned int type, 
+static int sqlite_iterate(unsigned int type,
                          Datum_Iterator iter,
-                         void * closure, 
+                         void * closure,
                          int sortByPriority) { 
   sqlite3_stmt * stmt;
   int count;
@@ -316,20 +316,20 @@
 
 #if DEBUG_SQLITE
   LOG(LOG_DEBUG, "SQLite: iterating through the database\n");
-#endif 
+#endif
 
   MUTEX_LOCK(&dbh->DATABASE_Lock_);
- 
-  strcpy(scratch, 
+
+  strcpy(scratch,
         "SELECT size, type, prio, anonLevel, expire, hash, value FROM gn070"
         " WHERE ((hash > :1 AND expire == :2 AND prio == :3) OR ");
-  if (sortByPriority) 
+  if (sortByPriority)
     strcat(scratch,
           "(expire > :4 AND prio == :5) OR prio > :6)");
   else
     strcat(scratch,
           "(prio > :4 AND expire == :5) OR expire > :6)");
-  if (type) 
+  if (type)
     strcat(scratch, " AND type = :7");
   else
     SNPRINTF(&scratch[strlen(scratch)],
@@ -338,12 +338,12 @@
             RESERVED_BLOCK); /* otherwise we iterate over
                                 the stats entry, which would
                                 be bad */
-  if (sortByPriority) 
+  if (sortByPriority)
     strcat(scratch, " ORDER BY prio ASC, expire ASC, hash ASC");
-  else 
-    strcat(scratch, " ORDER BY expire ASC, prio ASC, hash ASC");  
+  else
+    strcat(scratch, " ORDER BY expire ASC, prio ASC, hash ASC");
   strcat(scratch, " LIMIT 1");
-  if (sq_prepare(scratch, 
+  if (sq_prepare(scratch,
                 &stmt) != SQLITE_OK) {
     LOG_SQLITE(LOG_ERROR, "sqlite3_prepare");
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
@@ -356,7 +356,7 @@
   memset(&key, 0, sizeof(HashCode512));
   lastHash = MALLOC(sizeof(HashCode512)*2 + 2);
   while (1) {
-    hashLen = sqlite_encode_binary((const char *) &key, 
+    hashLen = sqlite_encode_binary((const char *) &key,
                                   sizeof(HashCode512),
                                   lastHash);
 
@@ -368,24 +368,24 @@
     sqlite3_bind_int64(stmt,
                       2,
                       lastExp);
-    sqlite3_bind_int(stmt, 
+    sqlite3_bind_int(stmt,
                     3,
                     lastPrio);
     if (sortByPriority) {
-      sqlite3_bind_int(stmt, 
+      sqlite3_bind_int(stmt,
                       4,
                       lastPrio);
       sqlite3_bind_int64(stmt,
                         5,
                         lastExp);
-      sqlite3_bind_int(stmt, 
+      sqlite3_bind_int(stmt,
                       6,
                       lastPrio);
     } else {
       sqlite3_bind_int64(stmt,
                         4,
                         lastExp);
-      sqlite3_bind_int(stmt, 
+      sqlite3_bind_int(stmt,
                       5,
                       lastPrio);
       sqlite3_bind_int64(stmt,
@@ -393,18 +393,18 @@
                         lastExp);
     }
     if (type)
-      sqlite3_bind_int(stmt, 
+      sqlite3_bind_int(stmt,
                       7,
-                      type);   
+                      type);
     if (sqlite3_step(stmt) == SQLITE_ROW) {
       datum = assembleDatum(stmt);
-      
+
       if (datum == NULL) {
        LOG(LOG_WARNING,
            _("Invalid data in database.  Please verify integrity!\n"));
-       continue; 
-      }    
-      
+       continue;
+      }
+
       /*      printf("FOUND %4u prio %4u exp %20llu old: %4u, %20llu\n",
             (ntohl(datum->value.size) - sizeof(Datastore_Value))/8,
             ntohl(datum->value.prio),
@@ -412,18 +412,18 @@
             lastPrio,
             lastExp);
       */
-      
+
       if (iter != NULL) {
        MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
-       if (SYSERR == iter(&datum->key, 
-                          &datum->value, 
+       if (SYSERR == iter(&datum->key,
+                          &datum->value,
                           closure) ) {
          count = SYSERR;
          FREE(datum);
-         MUTEX_LOCK(&dbh->DATABASE_Lock_);    
+         MUTEX_LOCK(&dbh->DATABASE_Lock_);
          break;
-       }    
-       MUTEX_LOCK(&dbh->DATABASE_Lock_);    
+       }
+       MUTEX_LOCK(&dbh->DATABASE_Lock_);
       }
       key = datum->key;
       lastPrio = ntohl(datum->value.prio);
@@ -432,12 +432,12 @@
       count++;
     } else
       break;
-    sqlite3_reset(stmt);           
+    sqlite3_reset(stmt);
   }
   FREE(lastHash);
-  sqlite3_finalize(stmt);    
+  sqlite3_finalize(stmt);
   MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
-  
+
 #if DEBUG_SQLITE
   LOG(LOG_DEBUG,
       "SQLite: reached end of database\n");
@@ -448,7 +448,7 @@
 
 /**
  * Call a method for each key in the database and
- * call the callback method on it. 
+ * call the callback method on it.
  *
  * @param type limit the iteration to entries of this
  *   type. 0 for all entries.
@@ -459,13 +459,13 @@
  */
 static int iterateLowPriority(unsigned int type,
                              Datum_Iterator iter,
-                             void * closure) {  
+                             void * closure) {
   return sqlite_iterate(type, iter, closure, 1);
 }
 
 /**
  * Call a method for each key in the database and
- * call the callback method on it. 
+ * call the callback method on it.
  *
  * @param handle the database
  * @param callback the callback method
@@ -484,7 +484,7 @@
 #endif
   if (! dbh)
     return;
-  
+
   MUTEX_DESTROY(&dbh->DATABASE_Lock_);
 
   sqlite3_finalize(dbh->countContent);
@@ -494,7 +494,7 @@
   syncStats();
   if (sqlite3_close(dbh->dbf) != SQLITE_OK)
     LOG_SQLITE(LOG_ERROR, "sqlite_close");
-  
+
   FREE(dbh->fn);
   FREE(dbh);
   dbh = NULL;
@@ -505,8 +505,8 @@
  * guaranteed to be unloading of the module.
  */
 static void drop() {
-  char *fn = STRDUP(dbh->fn);  
-  sqlite_shutdown();  
+  char *fn = STRDUP(dbh->fn);
+  sqlite_shutdown();
   UNLINK(fn);
   FREE(fn);
 }
@@ -522,8 +522,8 @@
  * @param iter maybe NULL (to just count)
  * @return the number of results, SYSERR if the
  *   iter is non-NULL and aborted the iteration
- */ 
-static int get(const HashCode512 * key, 
+ */
+static int get(const HashCode512 * key,
               unsigned int type,
               Datum_Iterator iter,
               void * closure) {
@@ -540,35 +540,35 @@
     hash2enc(block, (EncName *) key);
     LOG(LOG_DEBUG, "SQLite: read content %s\n", key);
   }
-#endif 
+#endif
 
-  MUTEX_LOCK(&dbh->DATABASE_Lock_); 
-  
-  strcpy(scratch, "SELECT "); 
+  MUTEX_LOCK(&dbh->DATABASE_Lock_);
+
+  strcpy(scratch, "SELECT ");
   if (iter == NULL)
     strcat(scratch, "count(*)");
   else
-    strcat(scratch, "size, type, prio, anonLevel, expire, hash, value"); 
+    strcat(scratch, "size, type, prio, anonLevel, expire, hash, value");
   strcat(scratch, " FROM gn070");
-  
+
   if (type || key) {
-    strcat(scratch, " WHERE ");    
+    strcat(scratch, " WHERE ");
     if (type) {
-      strcat(scratch, "type = :1");      
+      strcat(scratch, "type = :1");
       if (key)
        strcat(scratch, " and ");
-    }    
+    }
     if (key)
       strcat(scratch, "hash = :2");
   }
-  
-  if (sq_prepare(scratch, 
+
+  if (sq_prepare(scratch,
                 &stmt) != SQLITE_OK) {
     LOG_SQLITE(LOG_ERROR, "sqlite_query");
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
     return SYSERR;
-  }  
-  
+  }
+
   if (type)
     ret = sqlite3_bind_int(stmt,
                           bind++,
@@ -578,17 +578,17 @@
        
   if (key && (ret == SQLITE_OK)) {
     escapedHash = MALLOC(sizeof(HashCode512)*2 + 2);
-    len = sqlite_encode_binary((const char *) key, 
-                              sizeof(HashCode512), 
-                              escapedHash);    
+    len = sqlite_encode_binary((const char *) key,
+                              sizeof(HashCode512),
+                              escapedHash);
     ret = sqlite3_bind_blob(stmt,
                            bind,
-                           escapedHash, 
+                           escapedHash,
                            len,
                            SQLITE_TRANSIENT);
   }
 
-  if (ret == SQLITE_OK) {    
+  if (ret == SQLITE_OK) {
     while ((ret = sqlite3_step(stmt)) == SQLITE_ROW) {
       if (iter != NULL) {
        datum = assembleDatum(stmt);
@@ -596,7 +596,7 @@
        if (datum == NULL) {
          LOG(LOG_WARNING,
              _("Invalid data in database.  Please verify integrity!\n"));
-         continue; 
+         continue;
        }
 
 #if DEBUG_SQLITE
@@ -605,9 +605,9 @@
            ntohl(*(int*)&((&datum->value)[1])));
 #endif
        if (SYSERR == iter(&datum->key,
-                          &datum->value, 
+                          &datum->value,
                           closure) ) {
-         
+       
          count = SYSERR;
          FREE(datum);
          ret = SQLITE_DONE;
@@ -617,7 +617,7 @@
        count++;
       } else
        count += sqlite3_column_int(stmt, 0);
-    } 
+    }
     if (ret != SQLITE_DONE) {
       LOG_SQLITE(LOG_ERROR, "sqlite_query");
       sqlite3_finalize(stmt);
@@ -629,14 +629,14 @@
     sqlite3_finalize(stmt);
   } else
     LOG_SQLITE(LOG_ERROR, "sqlite_query");
-  
+
   MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
-  
+
 #if DEBUG_SQLITE
   LOG(LOG_DEBUG, "SQLite: done reading content\n");
-#endif 
+#endif
   FREENONNULL(escapedHash);
-  
+
   return count;
 }
 
@@ -646,7 +646,7 @@
  *
  * @return SYSERR on error, OK if ok.
  */
-static int put(const HashCode512 * key, 
+static int put(const HashCode512 * key,
               const Datastore_Value * value) {
   char *escapedBlock;
   char *escapedHash;
@@ -666,24 +666,24 @@
       ntohl(*(int*)&value[1]));
 #endif
 
-  MUTEX_LOCK(&dbh->DATABASE_Lock_);  
-  
+  MUTEX_LOCK(&dbh->DATABASE_Lock_);
+
   if (dbh->lastSync > 1000)
     syncStats(dbh);
-  
+
   rowLen = 0;
   contentSize = ntohl(value->size)-sizeof(Datastore_Value);
- 
+
   escapedHash = MALLOC(2*sizeof(HashCode512)+1);
-  hashLen = sqlite_encode_binary((const char *) key, 
+  hashLen = sqlite_encode_binary((const char *) key,
                                 sizeof(HashCode512),
                                 escapedHash);
-    
+
   escapedBlock = MALLOC(2 * contentSize + 1);
   blockLen = sqlite_encode_binary((const char *) &value[1],
-                                 contentSize, 
+                                 contentSize,
                                  escapedBlock);
-  
+
   stmt = dbh->insertContent;
   sqlite3_bind_int(stmt, 1, ntohl(value->size));
   sqlite3_bind_int(stmt, 2, ntohl(value->type));
@@ -692,13 +692,13 @@
   sqlite3_bind_int64(stmt, 5, ntohll(value->expirationTime));
   sqlite3_bind_blob(stmt, 6, escapedHash, hashLen, SQLITE_TRANSIENT);
   sqlite3_bind_blob(stmt, 7, escapedBlock, blockLen, SQLITE_TRANSIENT);
-  
+
   n = sqlite3_step(stmt);
   FREE(escapedBlock);
   FREE(escapedHash);
   sqlite3_reset(stmt);
   if(n != SQLITE_DONE) {
-    LOG_SQLITE(LOG_ERROR, 
+    LOG_SQLITE(LOG_ERROR,
               "sqlite_query");
     MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
     return SYSERR;
@@ -710,20 +710,20 @@
 #if DEBUG_SQLITE
   LOG(LOG_DEBUG,
       "SQLite: done writing content\n");
-#endif 
+#endif
 
   return OK;
 }
 
 /**
  * Delete an item from the datastore.
- *   
+ *
  * @param value maybe NULL, then all items under the
  *        given key are deleted
  * @return the number of items deleted, 0 if
  *        none were found, SYSERR on errors
  */
-static int del(const HashCode512 * key, 
+static int del(const HashCode512 * key,
               const Datastore_Value * value) {
   char *escapedHash;
   size_t n;
@@ -736,56 +736,56 @@
 
 #if DEBUG_SQLITE
   LOG(LOG_DEBUG, "SQLite: delete block\n");
-#endif 
+#endif
 
-  MUTEX_LOCK(&dbh->DATABASE_Lock_); 
-  
+  MUTEX_LOCK(&dbh->DATABASE_Lock_);
+
   if (dbh->lastSync > 1000)
     syncStats(dbh);
-  
+
   escapedHash = MALLOC(2 * sizeof(HashCode512) + 1);
   hashLen = sqlite_encode_binary((const char *)key,
                                 sizeof(HashCode512),
                                 escapedHash);
   if (!value) {
-    sqlite3_bind_blob(dbh->exists, 
-                     1, 
+    sqlite3_bind_blob(dbh->exists,
+                     1,
                      escapedHash,
                      hashLen,
                      SQLITE_TRANSIENT);
-    while(sqlite3_step(dbh->exists) == SQLITE_ROW) {     
-      rowLen = sqlite3_column_int(dbh->exists, 0) + 
+    while(sqlite3_step(dbh->exists) == SQLITE_ROW) {   
+      rowLen = sqlite3_column_int(dbh->exists, 0) +
        sqlite3_column_int(dbh->exists, 1) + 5 * sizeof(int);
-      
+
       if (dbh->payload > rowLen)
        dbh->payload -= rowLen;
       else
        dbh->payload = 0;
-      
+
       dbh->lastSync++;
     }
     sqlite3_reset(dbh->exists);
-    
+
     n = sq_prepare("DELETE FROM gn070 WHERE hash = ?", /*  ORDER BY prio ASC 
LIMIT 1" -- not available */
                   &stmt);
     if (n == SQLITE_OK) {
-      sqlite3_bind_blob(stmt, 
-                       1, 
-                       escapedHash, 
+      sqlite3_bind_blob(stmt,
+                       1,
+                       escapedHash,
                        hashLen,
                        SQLITE_TRANSIENT);
       n = sqlite3_step(stmt);
     }
-  } else {    
+  } else {
     n = sq_prepare("DELETE FROM gn070 WHERE hash = ? and "
                   "value = ? AND size = ? AND type = ? AND prio = ? AND 
anonLevel = ? "
                   "AND expire = ?", /* ORDER BY prio ASC LIMIT 1" -- not 
available in sqlite */
                   &stmt);
-    if (n == SQLITE_OK) {      
-      escapedBlock = MALLOC(2 * (ntohl(value->size)-sizeof(Datastore_Value)) + 
1);      
-  
+    if (n == SQLITE_OK) {
+      escapedBlock = MALLOC(2 * (ntohl(value->size)-sizeof(Datastore_Value)) + 
1);
+
       contentSize = ntohl(value->size)-sizeof(Datastore_Value);
-      blockLen = sqlite_encode_binary((const char *) &value[1], 
+      blockLen = sqlite_encode_binary((const char *) &value[1],
                                      contentSize,
                                      escapedBlock);
       sqlite3_bind_blob(stmt, 1, escapedHash, hashLen, SQLITE_TRANSIENT);
@@ -794,9 +794,9 @@
       sqlite3_bind_int(stmt, 4, ntohl(value->type));
       sqlite3_bind_int(stmt, 5, ntohl(value->prio));
       sqlite3_bind_int(stmt, 6, ntohl(value->anonymityLevel));
-      sqlite3_bind_int64(stmt, 7, ntohll(value->expirationTime));     
-      n = sqlite3_step(stmt);      
-      FREE(escapedBlock);      
+      sqlite3_bind_int64(stmt, 7, ntohll(value->expirationTime));
+      n = sqlite3_step(stmt);
+      FREE(escapedBlock);
       if ( (n == SQLITE_DONE) || (n == SQLITE_ROW) )
        dbh->payload -= (hashLen + blockLen + 5 * sizeof(long long));
     } else {
@@ -804,7 +804,7 @@
     }
   }
   deleted = ( (n == SQLITE_DONE) || (n == SQLITE_ROW) ) ? 
sqlite3_changes(dbh->dbf) : SYSERR;
-  
+
   FREE(escapedHash);
   sqlite3_finalize(stmt);
 
@@ -815,13 +815,13 @@
   }
 
   MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
-  
+
 #if DEBUG_SQLITE
-  LOG(LOG_DEBUG, 
-      "SQLite: %d block(s) deleted\n", 
+  LOG(LOG_DEBUG,
+      "SQLite: %d block(s) deleted\n",
       deleted);
-#endif 
-  
+#endif
+
   return deleted;
 }
 
@@ -837,50 +837,50 @@
   unsigned long contentSize;
 
 #if DEBUG_SQLITE
-  LOG(LOG_DEBUG, 
+  LOG(LOG_DEBUG,
       "SQLite: update block\n");
-#endif 
+#endif
 
-  MUTEX_LOCK(&dbh->DATABASE_Lock_);  
+  MUTEX_LOCK(&dbh->DATABASE_Lock_);
 
   contentSize = ntohl(value->size)-sizeof(Datastore_Value);
-  
+
   escapedHash = MALLOC(2*sizeof(HashCode512)+1);
   hashLen = sqlite_encode_binary((const char *) key,
                                 sizeof(HashCode512),
-                                escapedHash);  
+                                escapedHash);
   escapedBlock = MALLOC(2*contentSize+1);
-  blockLen = sqlite_encode_binary((const char *) &value[1], 
+  blockLen = sqlite_encode_binary((const char *) &value[1],
                                  contentSize,
                                  escapedBlock);
   sqlite3_bind_int(dbh->updPrio,
-                  1, 
+                  1,
                   delta);
-  sqlite3_bind_blob(dbh->updPrio, 
-                   2, 
-                   escapedHash, 
+  sqlite3_bind_blob(dbh->updPrio,
+                   2,
+                   escapedHash,
                    hashLen,
                    SQLITE_TRANSIENT);
-  sqlite3_bind_blob(dbh->updPrio, 
+  sqlite3_bind_blob(dbh->updPrio,
                    3,
-                   escapedBlock, 
+                   escapedBlock,
                    blockLen,
                    SQLITE_TRANSIENT);
   sqlite3_bind_int(dbh->updPrio,
                   4,
                   delta);
-  sqlite3_bind_int(dbh->updPrio, 
-                  5, 
+  sqlite3_bind_int(dbh->updPrio,
+                  5,
                   MAX_PRIO);
-  
+
   n = sqlite3_step(dbh->updPrio);
   sqlite3_reset(dbh->updPrio);
-  
+
   FREE(escapedHash);
   FREE(escapedBlock);
 
   MUTEX_UNLOCK(&dbh->DATABASE_Lock_);
-  
+
 #if DEBUG_SQLITE
   LOG(LOG_DEBUG, "SQLite: block updated\n");
 #endif
@@ -899,13 +899,13 @@
 
 #if DEBUG_SQLITE
   LOG(LOG_DEBUG, "SQLite: initializing database\n");
-#endif 
+#endif
 
   dbh = MALLOC(sizeof(sqliteHandle));
-  
+
   dbh->payload = 0;
   dbh->lastSync = 0;
-  
+
   afsdir = getFileName("FS", "DIR",
                       _("Configuration file must specify directory for "
                         "storing FS data in section '%s' under '%s'.\n"));
@@ -920,21 +920,21 @@
   FREE(dir);
 
   if (sqlite3_open(dbh->fn, &dbh->dbf) != SQLITE_OK) {
-    LOG(LOG_ERROR, 
+    LOG(LOG_ERROR,
         _("Unable to initialize SQLite.\n"));
     FREE(dbh->fn);
     FREE(dbh);
     return NULL;
   }
-  
+
   sqlite3_exec(dbh->dbf, "PRAGMA temp_store=MEMORY", NULL, NULL, NULL);
   sqlite3_exec(dbh->dbf, "PRAGMA synchronous=OFF", NULL, NULL, NULL);
   sqlite3_exec(dbh->dbf, "PRAGMA count_changes=OFF", NULL, NULL, NULL);
-  
-  sq_prepare("Select 1 from sqlite_master where tbl_name = 'gn070'", 
+
+  sq_prepare("Select 1 from sqlite_master where tbl_name = 'gn070'",
             &stmt);
   if (sqlite3_step(stmt) == SQLITE_DONE) {
-    if (sqlite3_exec(dbh->dbf, 
+    if (sqlite3_exec(dbh->dbf,
                     "CREATE TABLE gn070 ("
                     "  size INTEGER NOT NULL DEFAULT 0,"
                     "  type INTEGER NOT NULL DEFAULT 0,"
@@ -948,46 +948,46 @@
       FREE(dbh->fn);
       FREE(dbh);
       return NULL;
-    }    
+    }
   }
   sqlite3_finalize(stmt);
-    
+
   sqlite3_exec(dbh->dbf, "CREATE INDEX idx_hash ON gn070 (hash)",
               NULL, NULL, NULL);
   sqlite3_exec(dbh->dbf, "CREATE INDEX idx_prio ON gn070 (prio)",
               NULL, NULL, NULL);
   sqlite3_exec(dbh->dbf, "CREATE INDEX idx_expire ON gn070 (expire)",
               NULL, NULL, NULL);
-  
-  if ( (sq_prepare("SELECT COUNT(*) FROM gn070 WHERE hash=?", 
-                  &dbh->countContent) != SQLITE_OK) ||     
+
+  if ( (sq_prepare("SELECT COUNT(*) FROM gn070 WHERE hash=?",
+                  &dbh->countContent) != SQLITE_OK) ||
        (sq_prepare("SELECT LENGTH(hash), LENGTH(value) "
                   "FROM gn070 WHERE hash=?",
-                  &dbh->exists) != SQLITE_OK) ||                               
           
+                  &dbh->exists) != SQLITE_OK) ||                               
        
        (sq_prepare("UPDATE gn070 SET prio = prio + ? WHERE "
-                  "hash = ? AND value = ? AND prio + ? < ?", 
+                  "hash = ? AND value = ? AND prio + ? < ?",
                   &dbh->updPrio) != SQLITE_OK) ||
        (sq_prepare("INSERT INTO gn070 (size, type, prio, "
                   "anonLevel, expire, hash, value) VALUES "
                   "(?, ?, ?, ?, ?, ?, ?)",
-                  &dbh->insertContent) != SQLITE_OK) ) {    
-    LOG_SQLITE(LOG_ERROR, 
-              "precompiling");    
+                  &dbh->insertContent) != SQLITE_OK) ) {
+    LOG_SQLITE(LOG_ERROR,
+              "precompiling");
     FREE(dbh->fn);
     FREE(dbh);
     return NULL;
   }
-  
+
   dbh->payload = getStat("PAYLOAD");
-  
+
   if (dbh->payload == SYSERR) {
     FREE(dbh->fn);
     FREE(dbh);
-    return NULL;    
+    return NULL;
   }
-    
-  MUTEX_CREATE(&dbh->DATABASE_Lock_);  
 
+  MUTEX_CREATE(&dbh->DATABASE_Lock_);
+
   api.getSize = &getSize;
   api.put = &put;
   api.get = &get;
@@ -1003,7 +1003,7 @@
  * Shutdown the module.
  */
 void release_module_sqstore_sqlite() {
-  sqlite_shutdown();  
+  sqlite_shutdown();
 }
 
 /* end of sqlite.c */

Modified: GNUnet/src/applications/sqstore_sqlite/sqlitetest.c
===================================================================
--- GNUnet/src/applications/sqstore_sqlite/sqlitetest.c 2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/sqstore_sqlite/sqlitetest.c 2005-03-20 23:54:53 UTC 
(rev 464)
@@ -78,7 +78,7 @@
   int ret;
 
   ret = checkValue(key, val, closure);
-  (*closure) += 2;  
+  (*closure) += 2;
   return ret;
 }
 
@@ -87,7 +87,7 @@
                       int * closure) {
   int ret;
 
-  (*closure) -= 2;  
+  (*closure) -= 2;
   ret = checkValue(key, val, closure);
   return ret;
 }
@@ -114,9 +114,9 @@
                      ntohl(val->size)) ) )
       return SYSERR; /* duplicate! */
     FREE(*last);
-  } 
+  }
   *last = MALLOC(ntohl(val->size));
-  memcpy(*last, 
+  memcpy(*last,
         val,
         ntohl(val->size));
   return OK;
@@ -150,12 +150,12 @@
                                           NULL,
                                           NULL));
   for (i=255;i>=0;i--) {
-    memset(&key, 256-i, sizeof(HashCode512)); 
+    memset(&key, 256-i, sizeof(HashCode512));
     ASSERT(1 == api->get(&key, i, &checkValue, (void*) &i));
   }
   oldSize = api->getSize();
   for (i=255;i>=0;i-=2) {
-    memset(&key, 256-i, sizeof(HashCode512)); 
+    memset(&key, 256-i, sizeof(HashCode512));
     value = initValue(i);
     ASSERT(1 == api->del(&key, value));
     FREE(value);
@@ -172,7 +172,7 @@
   ASSERT(0 == i);
 
   for (i=0;i<256;i+=2) {
-    memset(&key, 256-i, sizeof(HashCode512)); 
+    memset(&key, 256-i, sizeof(HashCode512));
     value = initValue(i);
     ASSERT(1 == api->del(&key, value));
     FREE(value);
@@ -185,14 +185,14 @@
   api->put(&key, value);
   ASSERT(1 == api->iterateExpirationTime(ANY_BLOCK,
                                         (Datum_Iterator) &priorityCheck,
-                                        &i));  
+                                        &i));
   api->update(&key,
              value,
              4);
   i += 4;
   ASSERT(1 == api->iterateExpirationTime(ANY_BLOCK,
                                         (Datum_Iterator) &priorityCheck,
-                                        &i));  
+                                        &i));
   FREE(value);
 
   /* test multiple results */
@@ -203,7 +203,7 @@
   value = NULL;
   ASSERT(2 == api->iterateExpirationTime(ANY_BLOCK,
                                         (Datum_Iterator) &multipleCheck,
-                                        &value));  
+                                        &value));
   FREE(value);
   api->del(&key,
           NULL);
@@ -211,7 +211,7 @@
           NULL);
   ASSERT(0 == api->iterateExpirationTime(ANY_BLOCK,
                                         NULL,
-                                        NULL));  
+                                        NULL));
   api->drop();
   return OK;
  FAILURE:
@@ -222,9 +222,9 @@
 #define TEST_DB "/tmp/GNUnet_sqstore_test/"
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parser(int argc, 
+static int parser(int argc,
                  char * argv[]) {
   FREENONNULL(setConfigurationString("GNUNETD",
                                     "_MAGIC_",
@@ -255,14 +255,14 @@
   if (api != NULL) {
     ok = test(api);
     releaseService(api);
-  } else 
+  } else
     ok = SYSERR;
   doneCore();
   doneUtil();
-  if (ok == SYSERR) 
+  if (ok == SYSERR)
     return 1;
-  else 
-    return 0; 
+  else
+    return 0;
 }
 
 /* end of sqlitetest.c */

Modified: GNUnet/src/applications/stats/clientapi.c
===================================================================
--- GNUnet/src/applications/stats/clientapi.c   2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/stats/clientapi.c   2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/stats/clientapi.c 
+ * @file applications/stats/clientapi.c
  * @brief convenience API to the stats service
  * @author Christian Grothoff
  * @author Igor Wronsky
@@ -38,37 +38,37 @@
   const char *name = NULL;
 
   switch( type ) {
-  case p2p_PROTO_HELO : 
+  case p2p_PROTO_HELO :
     name = "p2p_PROTO_HELO";
     break;
-  case p2p_PROTO_SKEY : 
+  case p2p_PROTO_SKEY :
     name = "p2p_PROTO_SKEY";
     break;
-  case p2p_PROTO_PING : 
+  case p2p_PROTO_PING :
     name = "p2p_PROTO_PING";
     break;
-  case p2p_PROTO_PONG : 
+  case p2p_PROTO_PONG :
     name = "p2p_PROTO_PONG";
     break;
-  case p2p_PROTO_NOISE : 
+  case p2p_PROTO_NOISE :
     name = "p2p_PROTO_NOISE";
     break;
-  case p2p_PROTO_HANGUP : 
+  case p2p_PROTO_HANGUP :
     name = "p2p_PROTO_HANGUP";
     break;
-  case CHAT_p2p_PROTO_MSG : 
+  case CHAT_p2p_PROTO_MSG :
     name = "CHAT_p2p_PROTO_MSG";
     break;
-  case TRACEKIT_p2p_PROTO_PROBE : 
+  case TRACEKIT_p2p_PROTO_PROBE :
     name = "TRACEKIT_p2p_PROTO_PROBE";
     break;
-  case TRACEKIT_p2p_PROTO_REPLY : 
+  case TRACEKIT_p2p_PROTO_REPLY :
     name = "TRACEKIT_p2p_PROTO_REPLY";
     break;
-  case TBENCH_p2p_PROTO_REQUEST        : 
+  case TBENCH_p2p_PROTO_REQUEST        :
     name = "TBENCH_p2p_PROTO_REQUEST";
     break;
-  case TBENCH_p2p_PROTO_REPLY  : 
+  case TBENCH_p2p_PROTO_REPLY  :
     name = "TBENCH_p2p_PROTO_REPLY";
     break;
   default:
@@ -86,55 +86,55 @@
   const char *name = NULL;
 
   switch( type ) {
-  case CS_PROTO_RETURN_VALUE : 
+  case CS_PROTO_RETURN_VALUE :
     name = "CS_PROTO_RETURN_VALUE";
     break;
-  case CS_PROTO_CLIENT_COUNT : 
+  case CS_PROTO_CLIENT_COUNT :
     name = "CS_PROTO_CLIENT_COUNT";
     break;
-  case CS_PROTO_TRAFFIC_QUERY : 
+  case CS_PROTO_TRAFFIC_QUERY :
     name = "CS_PROTO_TRAFFIC_QUERY";
     break;
-  case CS_PROTO_TRAFFIC_INFO : 
+  case CS_PROTO_TRAFFIC_INFO :
     name = "CS_PROTO_TRAFFIC_INFO";
     break;
-  case STATS_CS_PROTO_GET_STATISTICS : 
+  case STATS_CS_PROTO_GET_STATISTICS :
     name = "STATS_CS_PROTO_GET_STATISTICS";
     break;
-  case STATS_CS_PROTO_STATISTICS : 
+  case STATS_CS_PROTO_STATISTICS :
     name = "STATS_CS_PROTO_STATISTICS";
     break;
-  case STATS_CS_PROTO_GET_CS_MESSAGE_SUPPORTED : 
+  case STATS_CS_PROTO_GET_CS_MESSAGE_SUPPORTED :
     name = "STATS_CS_PROTO_GET_CS_MESSAGE_SUPPORTED";
     break;
-  case STATS_CS_PROTO_GET_P2P_MESSAGE_SUPPORTED : 
+  case STATS_CS_PROTO_GET_P2P_MESSAGE_SUPPORTED :
     name = "STATS_CS_PROTO_GET_P2P_MESSAGE_SUPPORTED";
     break;
-  case CHAT_CS_PROTO_MSG : 
+  case CHAT_CS_PROTO_MSG :
     name = "CHAT_CS_PROTO_MSG";
     break;
-  case TRACEKIT_CS_PROTO_PROBE : 
+  case TRACEKIT_CS_PROTO_PROBE :
     name = "TRACEKIT_CS_PROTO_PROBE";
     break;
-  case TRACEKIT_CS_PROTO_REPLY : 
+  case TRACEKIT_CS_PROTO_REPLY :
     name = "TRACEKIT_CS_PROTO_REPLY";
     break;
-  case TBENCH_CS_PROTO_REQUEST : 
+  case TBENCH_CS_PROTO_REQUEST :
     name = "TBENCH_CS_PROTO_REQUEST";
     break;
-  case TBENCH_CS_PROTO_REPLY : 
+  case TBENCH_CS_PROTO_REPLY :
     name = "TBENCH_CS_PROTO_REPLY";
     break;
   default:
     name = NULL;
-    break;    
+    break;
   }
   return name;
 }
 
 /**
  * Request statistics from TCP socket.
- * @param sock the socket to use 
+ * @param sock the socket to use
  * @param processor function to call on each value
  * @return OK on success, SYSERR on error
  */
@@ -147,18 +147,18 @@
   unsigned int i;
   int mpos;
   int ret;
-  
+
   ret = OK;
-  csHdr.size 
+  csHdr.size
     = htons(sizeof(CS_HEADER));
   csHdr.type
     = htons(STATS_CS_PROTO_GET_STATISTICS);
   if (SYSERR == writeToSocket(sock,
-                             &csHdr)) 
-    return SYSERR;  
-  statMsg 
+                             &csHdr))
+    return SYSERR;
+  statMsg
     = MALLOC(MAX_BUFFER_SIZE);
-  statMsg->totalCounters 
+  statMsg->totalCounters
     = htonl(1); /* to ensure we enter the loop */
   count = 0;
   while ( count < ntohl(statMsg->totalCounters) ) {
@@ -167,7 +167,7 @@
     if (SYSERR == readFromSocket(sock,
                                 (CS_HEADER**)&statMsg)) {
       FREE(statMsg);
-      return SYSERR;    
+      return SYSERR;
     }
     if (ntohs(statMsg->header.size) < sizeof(STATS_CS_MESSAGE)) {
       BREAK();
@@ -177,16 +177,16 @@
     mpos = sizeof(unsigned long long) * ntohl(statMsg->statCounters);
     if (count == 0) {
       ret = processor(_("Uptime (seconds)"),
-                     (unsigned long long) 
+                     (unsigned long long)
                      ((cronTime(NULL) - 
ntohll(statMsg->startTime))/cronSECONDS),
                      cls);
     }
     for (i=0;i<ntohl(statMsg->statCounters);i++) {
-      if 
(mpos+strlen(&((char*)(((STATS_CS_MESSAGE_GENERIC*)statMsg)->values))[mpos])+1 
> 
+      if 
(mpos+strlen(&((char*)(((STATS_CS_MESSAGE_GENERIC*)statMsg)->values))[mpos])+1 >
          ntohs(statMsg->header.size) - sizeof(STATS_CS_MESSAGE)) {
        BREAK();
        ret = SYSERR;
-       break; /* out of bounds! */      
+       break; /* out of bounds! */
       }
       if (ret != SYSERR) {
        ret = 
processor(&((char*)(((STATS_CS_MESSAGE_GENERIC*)statMsg)->values))[mpos],
@@ -194,7 +194,7 @@
                        cls);
       }
       mpos += 
strlen(&((char*)(((STATS_CS_MESSAGE_GENERIC*)statMsg)->values))[mpos])+1;
-    }    
+    }
     count += ntohl(statMsg->statCounters);
   } /* end while */
   FREE(statMsg);
@@ -204,7 +204,7 @@
 
 /**
  * Request available protocols from TCP socket.
- * @param sock the socket to use 
+ * @param sock the socket to use
  * @param processor function to call on each value
  * @return OK on success, SYSERR on error
  */
@@ -217,17 +217,17 @@
   int ret;
 
   ret = OK;
-  csStatMsg.header.size 
+  csStatMsg.header.size
     = htons(sizeof(STATS_CS_GET_MESSAGE_SUPPORTED));
   csStatMsg.header.type
     = htons(STATS_CS_PROTO_GET_P2P_MESSAGE_SUPPORTED);
   for (i=0;i<65535;i++) {
     csStatMsg.type = htons(i);
-    if (SYSERR == writeToSocket(sock, 
-                               &csStatMsg.header)) 
+    if (SYSERR == writeToSocket(sock,
+                               &csStatMsg.header))
       return SYSERR;
     if (SYSERR == readTCPResult(sock,
-                               &supported)) 
+                               &supported))
       return SYSERR;
     if (supported == YES) {
       ret = processor(i, YES, cls);
@@ -239,11 +239,11 @@
     = htons(STATS_CS_PROTO_GET_CS_MESSAGE_SUPPORTED);
   for (i=0;i<65535;i++) {
     csStatMsg.type = htons(i);
-    if (SYSERR == writeToSocket(sock, 
-                               &csStatMsg.header)) 
-      return SYSERR;   
-    if (SYSERR == readTCPResult(sock, &supported)) 
+    if (SYSERR == writeToSocket(sock,
+                               &csStatMsg.header))
       return SYSERR;
+    if (SYSERR == readTCPResult(sock, &supported))
+      return SYSERR;
     if (supported == YES) {
       ret = processor(i, NO, cls);
       if (ret != OK)

Modified: GNUnet/src/applications/stats/gnunet-stats.c
===================================================================
--- GNUnet/src/applications/stats/gnunet-stats.c        2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/stats/gnunet-stats.c        2005-03-20 23:54:53 UTC 
(rev 464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/stats/gnunet-stats.c 
+ * @file applications/stats/gnunet-stats.c
  * @brief tool to obtain statistics from gnunetd.
  * @author Christian Grothoff
  * @author Igor Wronsky
@@ -57,10 +57,10 @@
 
   if (isP2P != lastIp2p) {
     if (isP2P)
-      fprintf(stream, 
+      fprintf(stream,
              _("Supported peer-to-peer messages:\n"));
     else
-      fprintf(stream, 
+      fprintf(stream,
              _("Supported client-server messages:\n"));
     lastIp2p = isP2P;
   }
@@ -69,12 +69,12 @@
   else
     name = csMessageName(type);
   if (name == NULL)
-    fprintf(stream, 
+    fprintf(stream,
            "\t%d\n",
            type);
   else
-    fprintf(stream, 
-           "\t%d\t(%s)\n", 
+    fprintf(stream,
+           "\t%d\t(%s)\n",
            type,
            name);
   return OK;
@@ -109,36 +109,36 @@
 static int parseOptions(int argc,
                        char ** argv) {
   int option_index;
-  int c;  
+  int c;
 
   while (1) {
     static struct GNoption long_options[] = {
-      { "protocols",          0, 0, 'p' }, 
+      { "protocols",          0, 0, 'p' },
       LONG_DEFAULT_OPTIONS,
       { 0,0,0,0 }
-    };    
+    };
     option_index = 0;
     c = GNgetopt_long(argc,
-                     argv, 
-                     "vhdc:L:H:", 
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     argv,
+                     "vhdc:L:H:",
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
     switch(c) {
-    case 'v': 
+    case 'v':
       printf("GNUnet v%s, gnunet-stats v%s\n",
             VERSION, STATS_VERSION);
       return SYSERR;
-    case 'h': 
-      printhelp(); 
+    case 'h':
+      printhelp();
       return SYSERR;
     case 'p':
       printProtocolsSelected = YES;
       break;
-    default: 
+    default:
       LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
       return -1;
@@ -153,7 +153,7 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return 0 ok, 1 on error
- */   
+ */
 int main(int argc, char ** argv) {
   int res;
   GNUNET_TCP_SOCKET * sock;
@@ -169,7 +169,7 @@
   res = requestStatistics(sock,
                          (StatisticsProcessor) &printStatistics,
                          stdout);
-  if ((printProtocolsSelected == YES) && 
+  if ((printProtocolsSelected == YES) &&
       (res == OK)) {
     res = requestAvailableProtocols(sock,
                                    (ProtocolProcessor) &printProtocols,

Modified: GNUnet/src/applications/stats/statistics.c
===================================================================
--- GNUnet/src/applications/stats/statistics.c  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/stats/statistics.c  2005-03-20 23:54:53 UTC (rev 
464)
@@ -6,12 +6,12 @@
   it under the terms of the GNU General Public License as published
   by the Free Software Foundation; either version 2, or (at your
   option) any later version.
-  
+
   GNUnet 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 GNUnet; see the file COPYING.  If not, write to the
   Free Software Foundation, Inc., 59 Temple Place - Suite 330,
@@ -44,27 +44,27 @@
 /* *************** service *************** */
 
 /**
- * When did the module start? 
+ * When did the module start?
  */
 static cron_t startTime;
 
 /**
- * How many values do we keep statistics for? 
+ * How many values do we keep statistics for?
  */
 static unsigned int statCounters = 0;
 
 /**
- * What are these values (value) 
+ * What are these values (value)
  */
 static unsigned long long * values = NULL;
 
 /**
- * A description for each of the values 
+ * A description for each of the values
  */
 static char ** descriptions = NULL;
 
 /**
- * lock for the stat module 
+ * lock for the stat module
  */
 static Mutex statLock;
 
@@ -97,7 +97,7 @@
        statCounters,
        statCounters+1);
   descriptions[statCounters-1] = STRDUP(name);
-  MUTEX_UNLOCK(&statLock);   
+  MUTEX_UNLOCK(&statLock);
   return statCounters-1;
 }
 
@@ -210,14 +210,14 @@
     = statHandle(_("% of allowed cpu load"));
   stat_connected
     = statHandle(_("# of connected peers"));
-  stat_bytes_noise_received 
+  stat_bytes_noise_received
     = statHandle(_("# bytes of noise received"));
 }
 
 static void immediateUpdates() {
   statSet(stat_handle_cpu_load, getCPULoad());
   statSet(stat_handle_network_load_up, getNetworkLoadUp());
-  statSet(stat_handle_network_load_down, getNetworkLoadDown());   
+  statSet(stat_handle_network_load_down, getNetworkLoadDown());
   statSet(stat_connected,
          coreAPI->forAllConnectedNodes(NULL, NULL));
 }
@@ -237,25 +237,25 @@
   int end;
   int mpos; /* postion in the message */
 
-  immediateUpdates();  
+  immediateUpdates();
   statMsg = (STATS_CS_MESSAGE*)MALLOC(MAX_BUFFER_SIZE);
-  statMsg->header.type 
+  statMsg->header.type
     = htons(STATS_CS_PROTO_STATISTICS);
-  statMsg->totalCounters 
+  statMsg->totalCounters
     = htonl(statCounters);
-  statMsg->statCounters 
+  statMsg->statCounters
     = htons(0);
-  statMsg->startTime 
+  statMsg->startTime
     = htonll(startTime);
-  
-  start = 0;  
+
+  start = 0;
   while (start < statCounters) {
     pos = start;
     /* first pass: gauge how many statistic numbers
        and their descriptions we can send in one message */
     mpos = 0;
     while ( (pos < statCounters) &&
-           (mpos + sizeof(unsigned long long) 
+           (mpos + sizeof(unsigned long long)
             + strlen(descriptions[pos]) + 1
             < MAX_BUFFER_SIZE - sizeof(STATS_CS_MESSAGE)) ) {
       mpos += sizeof(unsigned long long); /* value */
@@ -309,7 +309,7 @@
 /**
  * We received a request from a client to provide the number
  * of directly connected peers.  Sends the response.
- * 
+ *
  * @param client the socket connecting to the client
  * @param msg the request from the client
  * @returns OK if ok, SYSERR if not.
@@ -343,7 +343,7 @@
   GNUNET_ASSERT(myCoreAPI == NULL);
   myCoreAPI = capi;
   myApi = capi->requestService("stats");
-  if (myApi == NULL) { 
+  if (myApi == NULL) {
     BREAK();
     myCoreAPI = NULL;
     return SYSERR;
@@ -382,6 +382,6 @@
   myCoreAPI = NULL;
   return OK;
 }
- 
 
+
 /* end of statistics.c */

Modified: GNUnet/src/applications/stats/statistics.h
===================================================================
--- GNUnet/src/applications/stats/statistics.h  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/stats/statistics.h  2005-03-20 23:54:53 UTC (rev 
464)
@@ -59,7 +59,7 @@
 
   /* description for each of the values,
      separated by '\0'-terminators; the
-     last description is also terminated 
+     last description is also terminated
      by a '\0'; again statCounters entries */
   /* char descriptions[0]; */
 } STATS_CS_MESSAGE_GENERIC;
@@ -72,7 +72,7 @@
   CS_HEADER header;
 
   /**
-   * The type of the message (XX_CS_PROTO_XXXX) 
+   * The type of the message (XX_CS_PROTO_XXXX)
    * we want to know the status of.
    */
   unsigned short type;

Modified: GNUnet/src/applications/tbench/gnunet-tbench.c
===================================================================
--- GNUnet/src/applications/tbench/gnunet-tbench.c      2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/tbench/gnunet-tbench.c      2005-03-20 23:54:53 UTC 
(rev 464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/tbench/gnunet-tbench.c 
+ * @file applications/tbench/gnunet-tbench.c
  * @brief Transport mechanism benchmarking tool
  * @author Paul Ruth, Christian Grothoff
  */
@@ -50,12 +50,12 @@
  * Parse the options, set the timeout.
  * @param argc the number of options
  * @param argv the option list (including keywords)
- * @return OK on error, SYSERR if we should exit 
+ * @return OK on error, SYSERR if we should exit
  */
 static int parseOptions(int argc,
                        char ** argv) {
   int option_index;
-  int c;  
+  int c;
 
   FREENONNULL(setConfigurationString("GNUNETD",
                                     "LOGFILE",
@@ -72,19 +72,19 @@
       { "timeout", 1, 0, 't' },
       { "xspace", 1, 0, 'X' },
       { 0,0,0,0 }
-    };    
+    };
     option_index=0;
     c = GNgetopt_long(argc,
-                     argv, 
-                     "vhdc:L:H:n:s:r:i:t:S:X:g", 
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     argv,
+                     "vhdc:L:H:n:s:r:i:t:S:X:g",
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process*/
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
     switch(c) {
-    case 'g': 
+    case 'g':
       outputFormat = OF_GNUPLOT_INPUT;
       break;
     case 'h': {
@@ -95,7 +95,7 @@
          gettext_noop("output in gnuplot format") },
        HELP_LOGLEVEL,  
        { 'i', "iterations", "ITER",
-         gettext_noop("number of iterations") }, 
+         gettext_noop("number of iterations") },
        { 'n', "msg", "MESSAGES",
          gettext_noop("number of messages to use per iteration") },
        { 'r', "rec", "RECEIVER",
@@ -116,34 +116,34 @@
                 help);
       return SYSERR;
     }
-    case 'i': 
+    case 'i':
       if(1 != sscanf(GNoptarg,
                     "%ud",
                     &messageIterations)){
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-i");
        return SYSERR;
       }
       break;
-    case 'n': 
+    case 'n':
       if(1 != sscanf(GNoptarg,
                     "%ud",
                     &messageCnt)){
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-n");
        return SYSERR;
       }
       break;
-    case 'r': 
+    case 'r':
       messageReceiver = STRDUP(GNoptarg);
       break;
-    case 's': 
-      if(1 != sscanf(GNoptarg, 
+    case 's':
+      if(1 != sscanf(GNoptarg,
                     "%ud",
                     &messageSize)){
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-s");
        return SYSERR;
@@ -153,38 +153,38 @@
       if(1 != sscanf(GNoptarg,
                     "%ud",
                     &messageTrainSize)){
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-S");
        return SYSERR;
       }
       break;
     case 't':
-      if(1 != SSCANF(GNoptarg, 
-                    "%llud", 
+      if(1 != SSCANF(GNoptarg,
+                    "%llud",
                     &messageTimeOut)){
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-t");
        return SYSERR;
       }
       break;
-    case 'v': 
+    case 'v':
       printf("GNUnet v%s, gnunet-tbench v%s\n",
             VERSION,
             TBENCH_VERSION);
       return SYSERR;
     case 'X':
-      if(1 != SSCANF(GNoptarg, 
+      if(1 != SSCANF(GNoptarg,
                     "%llud",
                     &messageSpacing)){
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-X");
        return SYSERR;
       }
       break;
-    default: 
+    default:
       LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
       return -1;
@@ -199,7 +199,7 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return return value from gnunetsearch: 0: ok, -1: error
- */   
+ */
 int main(int argc, char ** argv) {
   GNUNET_TCP_SOCKET * sock;
   TBENCH_CS_MESSAGE msg;
@@ -207,7 +207,7 @@
   float messagesPercentLoss;
 
   if (SYSERR == initUtil(argc, argv, &parseOptions))
-    return 0; /* parse error, --help, etc. */ 
+    return 0; /* parse error, --help, etc. */
   sock = getClientSocket();
   if (sock == NULL)
     errexit(_("Could not connect to gnunetd.\n"));
@@ -224,7 +224,7 @@
   if (messageReceiver == NULL)
     errexit(_("You must specify a receiver!\n"));
   if (OK != enc2hash(messageReceiver,
-                    &msg.receiverId.hashPubKey))                    
+                    &msg.receiverId.hashPubKey))               
     errexit(_("Invalid receiver peer ID specified ('%s' is not valid 
name).\n"),
            messageReceiver);
   FREE(messageReceiver);
@@ -232,9 +232,9 @@
   if (SYSERR == writeToSocket(sock,
                              &msg.header))
     return -1;
-  
+
   buffer = NULL;
-  if (OK == readFromSocket(sock, 
+  if (OK == readFromSocket(sock,
                           (CS_HEADER**)&buffer)) {
     GNUNET_ASSERT(ntohs(buffer->header.size) ==
                  sizeof(TBENCH_CS_REPLY));
@@ -255,7 +255,7 @@
             buffer->mean_time);
       printf(_("\tvariance %8.4fms\n"),
             buffer->variance_time);
-      
+
       printf(_("Loss:\n"));
       printf(_("\tmax      %u\n"),
             ntohl(buffer->max_loss));
@@ -264,7 +264,7 @@
       printf(_("\tmean     %8.4f\n"),
             buffer->mean_loss);
       printf(_("\tvariance %8.4f\n"),
-            buffer->variance_loss); 
+            buffer->variance_loss);
       break;
     case OF_GNUPLOT_INPUT:
       printf("%f %f\n",
@@ -275,12 +275,12 @@
       printf(_("Output format not known, this should not happen.\n"));
     }
     FREE(buffer);
-  } else 
-    printf(_("\nDid not receive the message from gnunetd. Is gnunetd 
running?\n"));  
+  } else
+    printf(_("\nDid not receive the message from gnunetd. Is gnunetd 
running?\n"));
 
   releaseClientSocket(sock);
   doneUtil();
   return 0;
 }
 
-/* end of gnunet-tbench.c */ 
+/* end of gnunet-tbench.c */

Modified: GNUnet/src/applications/tbench/tbench.c
===================================================================
--- GNUnet/src/applications/tbench/tbench.c     2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/tbench/tbench.c     2005-03-20 23:54:53 UTC (rev 
464)
@@ -43,7 +43,7 @@
  * transport performance.
  */
 typedef struct {
-  p2p_HEADER header; 
+  p2p_HEADER header;
   unsigned int iterationNum;
   unsigned int packetNum;
   unsigned int priority;
@@ -108,16 +108,16 @@
       return results->lossCount;
     }
     if (0 == results->packetsReceived[lastPacketNumber]++) {
-      results->lossCount--;    
+      results->lossCount--;
     } else {
       results->duplicateCount++;
 #if DEBUG_TBENCH
       LOG(LOG_DEBUG,
          "Received duplicate message %u from iteration %u\n",
-         lastPacketNumber, 
+         lastPacketNumber,
          currIteration);
-#endif     
-    } 
+#endif
+    }
     SEMAPHORE_UP(presem);
   } while (OK == SEMAPHORE_DOWN_NONBLOCKING(postsem));
   return results->lossCount;
@@ -147,7 +147,7 @@
 #if DEBUG_TBENCH
   LOG(LOG_DEBUG,
       "Received message %u from iteration %u/%u\n",
-      htonl(msg->packetNum), 
+      htonl(msg->packetNum),
       htonl(msg->iterationNum),
       htonl(msg->nounce));
 #endif
@@ -156,7 +156,7 @@
         message,
         ntohs(message->size));
   reply->type = htons(TBENCH_p2p_PROTO_REPLY);
-  coreAPI->unicast(sender, 
+  coreAPI->unicast(sender,
                   reply,
                   ntohl(msg->priority), /* medium importance */
                   0); /* no delay */
@@ -175,7 +175,7 @@
     BREAK();
     return SYSERR;
   }
-  pmsg = (TBENCH_p2p_MESSAGE*) message;  
+  pmsg = (TBENCH_p2p_MESSAGE*) message;
   if (crc32N(&pmsg[1],
             ntohs(message->size) - sizeof(TBENCH_p2p_MESSAGE))
       != ntohl(pmsg->crc)) {
@@ -185,11 +185,11 @@
 #if DEBUG_TBENCH
   LOG(LOG_DEBUG,
       "Received message %u from iteration %u/%u\n",
-      htonl(pmsg->packetNum), 
+      htonl(pmsg->packetNum),
       htonl(pmsg->iterationNum),
       htonl(pmsg->nounce));
 #endif
-  MUTEX_LOCK(&lock); 
+  MUTEX_LOCK(&lock);
   if ( (timeoutOccured == NO) &&
        (presem != NULL) &&
        (postsem != NULL) &&
@@ -250,8 +250,8 @@
 
   if ( ntohs(message->size) != sizeof(TBENCH_CS_MESSAGE) )
     return SYSERR;
-  
-  msg = (TBENCH_CS_MESSAGE*) message; 
+
+  msg = (TBENCH_CS_MESSAGE*) message;
   size = sizeof(TBENCH_p2p_MESSAGE) + ntohl(msg->msgSize);
   if (size < sizeof(TBENCH_p2p_MESSAGE))
     return SYSERR;
@@ -261,7 +261,7 @@
 #if DEBUG_TBENCH
   LOG(LOG_MESSAGE,
       "Tbench runs %u test messages of size %u in %u iterations.\n",
-      msgCnt, 
+      msgCnt,
       size,
       iterations);
 #endif
@@ -275,7 +275,7 @@
   p2p->header.type = htons(TBENCH_p2p_PROTO_REQUEST);
   p2p->priority = msg->priority;
 
-  MUTEX_LOCK(&lock);  
+  MUTEX_LOCK(&lock);
   for (iteration=0;iteration<iterations;iteration++) {
     results[iteration].maxPacketNumber = msgCnt;
     results[iteration].packetsReceived = MALLOC(msgCnt);
@@ -289,10 +289,10 @@
     presem = SEMAPHORE_NEW(1);
     postsem = SEMAPHORE_NEW(0);
     currNounce = randomi(0xFFFFFF);
-    p2p->nounce 
+    p2p->nounce
       = htonl(currNounce);
     currIteration = iteration;
-    p2p->iterationNum 
+    p2p->iterationNum
       = htonl(currIteration);
     memset(&p2p[1],
           randomi(256),
@@ -300,7 +300,7 @@
     p2p->crc
       = htonl(crc32N(&p2p[1],
                     size - sizeof(TBENCH_p2p_MESSAGE)));
-    
+
     MUTEX_UNLOCK(&lock); /* allow receiving */
 
     cronTime(&startTime);
@@ -311,19 +311,19 @@
               ntohll(msg->timeOut) * cronMILLIS,
               0,
               postsem);
-    for (packetNum=0;packetNum<msgCnt;packetNum++){      
+    for (packetNum=0;packetNum<msgCnt;packetNum++){
       cronTime(&now);
       if (now > endTime)
        break; /* timeout */
-      
+
       p2p->packetNum = htonl(packetNum);
 #if DEBUG_TBENCH
       LOG(LOG_DEBUG,
          "Sending message %u in iteration %u\n",
          packetNum, iteration);
 #endif
-      coreAPI->unicast(&msg->receiverId, 
-                      &p2p->header, 
+      coreAPI->unicast(&msg->receiverId,
+                      &p2p->header,
                       ntohl(msg->priority),
                       0); /* no delay */
       pollResults(&results[iteration], NO);
@@ -339,7 +339,7 @@
          } else
            gnunet_util_sleep(delayStart + delay - now);
        }
-      }            
+      }        
       if ( (0 == pollResults(&results[iteration], NO)) &&
           (earlyEnd == 0) )
        earlyEnd = cronTime(NULL);
@@ -359,7 +359,7 @@
     MUTEX_LOCK(&lock);
     if (earlyEnd == 0)
       earlyEnd = now;
-    results[iteration].totalTime 
+    results[iteration].totalTime
       = earlyEnd - startTime;
     FREE(results[iteration].packetsReceived);
     suspendCron();
@@ -385,7 +385,7 @@
   for (iteration=0;iteration<iterations;iteration++) {
     sum_loss += results[iteration].lossCount;
     sum_time += results[iteration].totalTime;
-    
+
     if (results[iteration].lossCount > max_loss)
       max_loss = results[iteration].lossCount;
     if (results[iteration].lossCount < min_loss)
@@ -394,19 +394,19 @@
       max_time = results[iteration].totalTime;
     if (results[iteration].totalTime < min_time)
       min_time = results[iteration].totalTime;
-  } 
- 
+  }
+
   sum_variance_time = 0.0;
   sum_variance_loss = 0.0;
   for(iteration = 0; iteration <iterations; iteration++){
-    sum_variance_time += 
+    sum_variance_time +=
       (results[iteration].totalTime - sum_time/iterations) *
       (results[iteration].totalTime - sum_time/iterations);
-    sum_variance_loss += 
+    sum_variance_loss +=
       (results[iteration].lossCount - sum_loss/iterations) *
       (results[iteration].lossCount - sum_loss/iterations);
   }
-  
+
   /* send collected stats back to client */
   reply.header.size = htons(sizeof(TBENCH_CS_REPLY));
   reply.header.type = htons(TBENCH_CS_PROTO_REPLY);

Modified: GNUnet/src/applications/tbench/tbench.h
===================================================================
--- GNUnet/src/applications/tbench/tbench.h     2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/tbench/tbench.h     2005-03-20 23:54:53 UTC (rev 
464)
@@ -38,7 +38,7 @@
    */
   unsigned int msgSize;
   /**
-   * How many messages should be transmitted in 
+   * How many messages should be transmitted in
    * each iteration?
    */
   unsigned int msgCnt;
@@ -80,11 +80,11 @@
   unsigned int min_loss;
   float mean_loss;
   float variance_loss;
-  
+
   cron_t max_time;
   cron_t min_time;
   float mean_time;
-  float variance_time;  
+  float variance_time;
 } TBENCH_CS_REPLY;
 
 #endif

Modified: GNUnet/src/applications/tbench/tbenchtest.c
===================================================================
--- GNUnet/src/applications/tbench/tbenchtest.c 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/tbench/tbenchtest.c 2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/tbench/tbenchtest.c 
+ * @file applications/tbench/tbenchtest.c
  * @brief Transport mechanism testing tool
  * @author Paul Ruth, Christian Grothoff
  */
@@ -61,8 +61,8 @@
   float messagesPercentLoss;
 
   printf(_("Using %u messages of size %u for %u times.\n"),
-        messageCnt, 
-        messageSize, 
+        messageCnt,
+        messageSize,
         messageIterations);
   msg.header.size = htons(sizeof(TBENCH_CS_MESSAGE));
   msg.header.type = htons(TBENCH_CS_PROTO_REQUEST);
@@ -74,12 +74,12 @@
   msg.timeOut     = htonll(messageTimeOut);
   msg.priority    = htonl(5);
   msg.receiverId  = peer2;
-  
+
   if (SYSERR == writeToSocket(sock,
                              &msg.header))
     return -1;
   ret = 0;
-  
+
   buffer = NULL;
   if (OK == readFromSocket(sock, (CS_HEADER**)&buffer)) {
     if ((float)buffer->mean_loss <= 0){
@@ -96,9 +96,9 @@
           ntohl(buffer->max_loss),
           ntohl(buffer->min_loss),
           buffer->mean_loss,
-          buffer->variance_loss); 
+          buffer->variance_loss);
   } else {
-    printf(_("\nFailed to receive reply from gnunetd.\n"));  
+    printf(_("\nFailed to receive reply from gnunetd.\n"));
     ret = -1;
   }
   FREENONNULL(buffer);
@@ -125,7 +125,7 @@
   while (OK == requestStatistics(sock,
                                 &waitForConnect,
                                 NULL)) {
-    printf(_("Waiting for peers to connect (%u iterations left)...\n"), 
+    printf(_("Waiting for peers to connect (%u iterations left)...\n"),
           left);
     sleep(5);
     left--;
@@ -143,7 +143,7 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return 0: ok, -1: error
- */   
+ */
 int main(int argc, char ** argv) {
 #if DO_FORK
   pid_t daemon1;
@@ -198,18 +198,18 @@
   if (daemon1 != -1) {
     if (0 != kill(daemon1, SIGTERM))
       DIE_STRERROR("kill");
-    if (daemon1 != waitpid(daemon1, &status, 0)) 
+    if (daemon1 != waitpid(daemon1, &status, 0))
       DIE_STRERROR("waitpid");
   }
   if (daemon2 != -1) {
     if (0 != kill(daemon2, SIGTERM))
       DIE_STRERROR("kill");
-    if (daemon2 != waitpid(daemon2, &status, 0)) 
+    if (daemon2 != waitpid(daemon2, &status, 0))
       DIE_STRERROR("waitpid");
   }
 
   /* re-start, this time we're sure up-to-date HELOs are available */
-  daemon1 = fork(); 
+  daemon1 = fork();
   if (daemon1 == 0) {
     if (0 != execlp("gnunetd", /* what binary to execute, must be in $PATH! */
                    "gnunetd", /* arg0, path to gnunet binary */
@@ -241,7 +241,7 @@
   }
   sleep(5);
 #endif
-  
+
   ret = 0;
   left = 5;
   /* wait for connection or abort with error */
@@ -265,7 +265,7 @@
   /* 'slow' pass: wait for bandwidth negotiation! */
   if (ret == 0)
     ret = test(sock, 64, 100, 4, 50 * cronMILLIS, 1, 30 * cronSECONDS);
-  checkConnected(sock);  
+  checkConnected(sock);
   /* 'blast' pass: hit bandwidth limits! */
   for (i=8;i<60000;i*=2) {
     if (ret == 0)
@@ -280,17 +280,17 @@
   if (daemon1 != -1) {
     if (0 != kill(daemon1, SIGTERM))
       DIE_STRERROR("kill");
-    if (daemon1 != waitpid(daemon1, &status, 0)) 
+    if (daemon1 != waitpid(daemon1, &status, 0))
       DIE_STRERROR("waitpid");
   }
   if (daemon2 != -1) {
     if (0 != kill(daemon2, SIGTERM))
       DIE_STRERROR("kill");
-    if (daemon2 != waitpid(daemon2, &status, 0)) 
+    if (daemon2 != waitpid(daemon2, &status, 0))
       DIE_STRERROR("waitpid");
   }
 #endif
   return ret;
 }
 
-/* end of tbenchtest.c */ 
+/* end of tbenchtest.c */

Modified: GNUnet/src/applications/template/gnunet-template.c
===================================================================
--- GNUnet/src/applications/template/gnunet-template.c  2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/template/gnunet-template.c  2005-03-20 23:54:53 UTC 
(rev 464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/template/gnunet-template.c 
+ * @file applications/template/gnunet-template.c
  * @brief template for writing a GNUnet tool (client)
  * @author Christian Grothoff
  */
@@ -35,12 +35,12 @@
  * Parse the options, set the timeout.
  * @param argc the number of options
  * @param argv the option list (including keywords)
- * @return OK on error, SYSERR if we should exit 
+ * @return OK on error, SYSERR if we should exit
  */
 static int parseOptions(int argc,
                        char ** argv) {
   int option_index;
-  int c;  
+  int c;
 
   FREENONNULL(setConfigurationString("GNUNETD",
                                     "LOGFILE",
@@ -49,14 +49,14 @@
     static struct GNoption long_options[] = {
       LONG_DEFAULT_OPTIONS,
       { 0,0,0,0 }
-    };    
+    };
     option_index=0;
     c = GNgetopt_long(argc,
-                     argv, 
-                     "vhdc:L:H:t", 
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     argv,
+                     "vhdc:L:H:t",
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
@@ -77,12 +77,12 @@
 
       return SYSERR;
     }
-    case 'v': 
+    case 'v':
       printf("GNUnet v%s, gnunet-template v%s\n",
             VERSION,
             TEMPLATE_VERSION);
       return SYSERR;
-    default: 
+    default:
       LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
       return -1;
@@ -95,7 +95,7 @@
   void * buffer;
 
   buffer = MALLOC(MAX_BUFFER_SIZE);
-  while (OK == readFromSocket(sock, 
+  while (OK == readFromSocket(sock,
                              (CS_HEADER**)&buffer)) {
     /* process */
   }
@@ -108,18 +108,18 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return return value from gnunet-template: 0: ok, -1: error
- */   
+ */
 int main(int argc, char ** argv) {
   GNUNET_TCP_SOCKET * sock;
   PTHREAD_T messageReceiveThread;
   void * unused;
 
   if (SYSERR == initUtil(argc, argv, &parseOptions))
-    return 0; /* parse error, --help, etc. */ 
+    return 0; /* parse error, --help, etc. */
   sock = getClientSocket();
 
-  if (0 != PTHREAD_CREATE(&messageReceiveThread, 
-                         (PThreadMain) &receiveThread, 
+  if (0 != PTHREAD_CREATE(&messageReceiveThread,
+                         (PThreadMain) &receiveThread,
                          sock,
                          128 * 1024))
     DIE_STRERROR("pthread_create");

Modified: GNUnet/src/applications/testbed/commands.c
===================================================================
--- GNUnet/src/applications/testbed/commands.c  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/testbed/commands.c  2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/testbed/commands.c 
+ * @file applications/testbed/commands.c
  * @brief the commands available in the testbed
  * @author Ronaldo Alves Ferreira
  * @author Christian Grothoff
@@ -102,34 +102,34 @@
  * Send a message to peer 'peer' of type 'msgType'
  * the given size and data.
  */
-static int sendMessage(unsigned msgType, 
-                      int peer, 
-                      unsigned short argSize, 
+static int sendMessage(unsigned msgType,
+                      int peer,
+                      unsigned short argSize,
                       void *arg) {
   TESTBED_CS_MESSAGE * msg;
   int msgsz;
-  
+
   /* Assume peer value is valid. */
-  if (argSize + sizeof(TESTBED_CS_MESSAGE) > 65535) 
+  if (argSize + sizeof(TESTBED_CS_MESSAGE) > 65535)
     errexit("Message body too big for sendMessage: %s\n",
            argSize);
-  
+
   msgsz = sizeof(TESTBED_CS_MESSAGE)+argSize;
   msg = MALLOC(msgsz);
-  msg->header.size 
+  msg->header.size
     = htons(msgsz);
-  msg->header.type 
+  msg->header.type
     = htons(TESTBED_CS_PROTO_REQUEST);
   msg->msgType
     = htonl(msgType);
-  memcpy(&((TESTBED_CS_MESSAGE_GENERIC*)msg)->data[0], 
-        arg, 
+  memcpy(&((TESTBED_CS_MESSAGE_GENERIC*)msg)->data[0],
+        arg,
         argSize);
   msgsz = writeToSocket(&nodes[peer].sock,
                        &msg->header);
   FREE(msg);
   if (msgsz == SYSERR) {
-    XPRINTF(" Could not send message to peer %s.\n", 
+    XPRINTF(" Could not send message to peer %s.\n",
           nodes[peer].ips);
     return SYSERR;
   }
@@ -163,7 +163,7 @@
 static int addNode(int argc, char * argv[]) {
   int currindex;
   TESTBED_HELO_MESSAGE * hdr;
-  TESTBED_GET_HELO_MESSAGE req;  
+  TESTBED_GET_HELO_MESSAGE req;
   int port;
   int i;
 
@@ -180,8 +180,8 @@
       return -1;
     }
   }
-  
-  
+
+
   req.proto = 0;
   req.reserved = 0;
   /* connect */
@@ -195,7 +195,7 @@
 #else
   nodes[currindex].ip.addr.S_un.S_addr = inet_addr(argv[0]);
 #endif
-  
+
   if (SYSERR == initGNUnetClientSocket(nodes[currindex].port,
                                       nodes[currindex].ips,
                                       &nodes[currindex].sock)) {
@@ -204,7 +204,7 @@
           nodes[currindex].port);
     return -1;
   }
-  
+
   /* request HELO */
   if (OK != sendMessage(TESTBED_GET_HELO,
                        currindex,
@@ -213,14 +213,14 @@
     /* send message already printed an error message */
     destroySocket(&nodes[currindex].sock);
     FREE(nodes[currindex].ips);
-    GROW(nodes, 
-        nnodes, 
+    GROW(nodes,
+        nnodes,
         nnodes-1);
     return -1;
   }
-  
+
   hdr = NULL;
-  if (SYSERR == readFromSocket(&nodes[currindex].sock, 
+  if (SYSERR == readFromSocket(&nodes[currindex].sock,
                               (CS_HEADER**)&hdr)) {
     XPRINTF(" peer %s is not responding.\n",
           nodes[currindex].ips);
@@ -234,10 +234,10 @@
        (ntohl(hdr->header.msgType) == TESTBED_HELO_RESPONSE) &&
        (ntohs(hdr->header.header.size) - sizeof(TESTBED_CS_MESSAGE) >= 
sizeof(HELO_Message)) &&
        (ntohs(hdr->header.header.size) - sizeof(TESTBED_CS_MESSAGE) == 
HELO_Message_size(&hdr->helo)) ) {
-    nodes[currindex].helo 
+    nodes[currindex].helo
       = MALLOC(HELO_Message_size(&hdr->helo));
-    memcpy(nodes[currindex].helo, 
-          &hdr->helo, 
+    memcpy(nodes[currindex].helo,
+          &hdr->helo,
           HELO_Message_size(&hdr->helo));
   } else {
     FREE(hdr);
@@ -245,7 +245,7 @@
     XPRINTF(" peer %s did not respond with proper HELO.\n",
           nodes[currindex].ips);
     FREE(nodes[currindex].ips);
-    GROW(nodes, nnodes, nnodes-1);    
+    GROW(nodes, nnodes, nnodes-1);
     return -1;
   }
   FREE(hdr);
@@ -264,7 +264,7 @@
 static int addSshNode(int argc, char * argv[]) {
   int currindex;
   TESTBED_HELO_MESSAGE * hdr;
-  TESTBED_GET_HELO_MESSAGE req;  
+  TESTBED_GET_HELO_MESSAGE req;
   int port;
   int i;
   pid_t pid;
@@ -272,7 +272,7 @@
   int rtc;
   int ret;
   int status;
-    
+
   if (argc != 3) {
     XPRINTF("Syntax: add-ssh-node LOGIN IP PORT.\n");
     return -1;
@@ -300,14 +300,14 @@
       return -1;
     }
     if ( SETSOCKOPT(s,
-                   SOL_SOCKET, 
-                   SO_REUSEADDR, 
+                   SOL_SOCKET,
+                   SO_REUSEADDR,
                    &on, sizeof(on)) < 0 )
       perror("setsockopt");
     memset(&addr,
           0,
           sizeof(addr));
-    addr.sin_family 
+    addr.sin_family
       = AF_INET;
     addr.sin_addr.s_addr
       = htonl(INADDR_ANY);
@@ -320,13 +320,13 @@
       break; /* found port! */
     } else {
       CLOSE(s); /* not available, try another one... */
-    }    
+    }
   }
   if (lport == 65535) {
     XPRINTF(" Cannot find available local port!\n");
     return -1;
   }
-  
+
   pid = fork();
   if (pid == 0) {
     char * sargv[7];
@@ -350,14 +350,14 @@
        " execvp failed: %s\n",
        strerror(errno));
     exit(-1);
-  } 
+  }
   if (pid == -1) {
     XPRINTF("Failed to fork: %s\n",
           strerror(errno));
     return -1;
   }
-  
 
+
   req.proto = 0;
   req.reserved = 0;
   /* connect */
@@ -378,7 +378,7 @@
     ret = initGNUnetClientSocket(nodes[currindex].port,
                                 nodes[currindex].ips,
                                 &nodes[currindex].sock);
-    if (ret == OK) 
+    if (ret == OK)
       break;
     rtc++;
     gnunet_util_sleep(cronSECONDS);
@@ -391,11 +391,11 @@
         SIGTERM);
     waitpid(nodes[currindex].ssh,
            &status,
-           0); 
+           0);
     GROW(nodes, nnodes, nnodes-1);
     return -1;
   }
-  
+
   /* request HELO */
   if (OK != sendMessage(TESTBED_GET_HELO,
                        currindex,
@@ -410,14 +410,14 @@
     waitpid(nodes[currindex].ssh,
            &status,
            0);
-    GROW(nodes, 
-        nnodes, 
+    GROW(nodes,
+        nnodes,
         nnodes-1);
     return -1;
   }
-  
+
   hdr = NULL;
-  if (SYSERR == readFromSocket(&nodes[currindex].sock, 
+  if (SYSERR == readFromSocket(&nodes[currindex].sock,
                               (CS_HEADER**)&hdr)) {
     XPRINTF(" peer %s is not responding.\n",
           nodes[currindex].ips);
@@ -437,10 +437,10 @@
        (ntohl(hdr->header.msgType) == TESTBED_HELO_RESPONSE) &&
        (ntohs(hdr->header.header.size) - sizeof(TESTBED_CS_MESSAGE) >= 
sizeof(HELO_Message)) &&
        (ntohs(hdr->header.header.size) - sizeof(TESTBED_CS_MESSAGE) == 
HELO_Message_size(&hdr->helo)) ) {
-    nodes[currindex].helo 
+    nodes[currindex].helo
       = MALLOC(HELO_Message_size(&hdr->helo));
-    memcpy(nodes[currindex].helo, 
-          &hdr->helo, 
+    memcpy(nodes[currindex].helo,
+          &hdr->helo,
           HELO_Message_size(&hdr->helo));
   } else {
     FREE(hdr);
@@ -454,7 +454,7 @@
     waitpid(nodes[currindex].ssh,
            &status,
            0);
-    GROW(nodes, nnodes, nnodes-1);    
+    GROW(nodes, nnodes, nnodes-1);
     return -1;
   }
   FREE(hdr);
@@ -470,16 +470,16 @@
 static int delConnection(int argc,
                         char * argv[]) {
   int src, dst, ack;
-  
+
   if (argc != 2) {
     XPRINTF("Syntax: disconnect PEERID PEERID\n");
     return -1;
   }
   CHECK_SRC_DST(src, dst, argv[0], argv[1]);
-  if (OK != sendMessage(TESTBED_DEL_PEER, 
+  if (OK != sendMessage(TESTBED_DEL_PEER,
                        src,
                        sizeof(PeerIdentity),
-                       &nodes[dst].helo->senderIdentity)) 
+                       &nodes[dst].helo->senderIdentity))
     return -1;
   if (OK != readResult(src,
                       &ack))
@@ -499,16 +499,16 @@
 static int delAllConnections(int argc,
                             char * argv[]) {
   int dst, ack;
-  
+
   if (argc != 1) {
     XPRINTF("Syntax: disconnect-all PEERID\n");
     return -1;
   }
   CHECK_PEER(dst, argv[0]);
-  if (OK != sendMessage(TESTBED_DEL_ALL_PEERS, 
+  if (OK != sendMessage(TESTBED_DEL_ALL_PEERS,
                        dst,
                        0,
-                       NULL)) 
+                       NULL))
     return -1;
   if (OK != readResult(dst,
                       &ack))
@@ -525,10 +525,10 @@
 /**
  * Add a connection between two peers.
  */
-static int addConnection(int argc, 
+static int addConnection(int argc,
                         char * argv[]) {
   int src, dst, ack;
-  
+
   if (argc != 2) {
     XPRINTF("Syntax: connect PEERID PEERID\n");
     return -1;
@@ -537,11 +537,11 @@
   if (SYSERR == sendMessage(TESTBED_ADD_PEER,
                            src,
                            HELO_Message_size(nodes[dst].helo),
-                           nodes[dst].helo)) 
+                           nodes[dst].helo))
     return -1;
   if (OK != readResult(src,
                       &ack))
-    return -1;  
+    return -1;
   if (ack == OK) {
     XPRINTF("OK.\n");
     return 0;
@@ -558,7 +558,7 @@
 static int setTrust(int argc, char * argv[]) {
   int src, dst, value, ack;
   TESTBED_SET_TVALUE_MESSAGE msg;
-  
+
   if (argc != 3) {
     XPRINTF("Syntax: set-trust PEERID PEERID TRUST\n");
     return -1;
@@ -572,10 +572,10 @@
   if (SYSERR == sendMessage(TESTBED_SET_TVALUE,
                            src,
                            sizeof(PeerIdentity)+sizeof(unsigned int),
-                           &msg.otherPeer)) 
-    return -1;  
+                           &msg.otherPeer))
+    return -1;
   if (OK != readResult(src,
-                      &ack)) 
+                      &ack))
     return -1;
   if (htonl(ack) != OK) {
     XPRINTF(" peer could not set trust value.\n");
@@ -591,24 +591,24 @@
  */
 static int getTrust(int argc, char *argv[]) {
   int src, dst, value;
-  
+
   if (argc != 2) {
     XPRINTF("Syntax: get-trust PEERID PEERID\n");
     return -1;
   }
   CHECK_SRC_DST(src, dst, argv[0], argv[1]);
-  if (SYSERR == sendMessage(TESTBED_GET_TVALUE, 
-                           src, 
+  if (SYSERR == sendMessage(TESTBED_GET_TVALUE,
+                           src,
                            sizeof(PeerIdentity),
-                           &nodes[dst].helo->senderIdentity)) 
+                           &nodes[dst].helo->senderIdentity))
     return -1;
-  if (SYSERR == readResult(src, &value)) 
+  if (SYSERR == readResult(src, &value))
     return -1;
   if (value < 0) {
     XPRINTF(" could not get trust value.\n");
     return -1;
   } else {
-    XPRINTF("%d\n", 
+    XPRINTF("%d\n",
           value);
     return 0;
   }
@@ -619,18 +619,18 @@
  */
 static int disableHELO(int argc, char *argv[]) {
   int dst, value;
-  
+
   if (argc != 1) {
     XPRINTF("Syntax: helo-disable PEERID\n");
     return -1;
   }
   CHECK_PEER(dst, argv[0]);
-  if (SYSERR == sendMessage(TESTBED_DISABLE_HELO, 
-                           dst, 
+  if (SYSERR == sendMessage(TESTBED_DISABLE_HELO,
+                           dst,
                            0,
-                           NULL)) 
+                           NULL))
     return -1;
-  if (SYSERR == readResult(dst, &value)) 
+  if (SYSERR == readResult(dst, &value))
     return -1;
   if (value != OK) {
     XPRINTF(" could disable HELO\n");
@@ -646,18 +646,18 @@
  */
 static int enableHELO(int argc, char *argv[]) {
   int dst, value;
-  
+
   if (argc != 1) {
     XPRINTF("Syntax: helo-enable PEERID\n");
     return -1;
   }
   CHECK_PEER(dst, argv[0]);
-  if (SYSERR == sendMessage(TESTBED_ENABLE_HELO, 
-                           dst, 
+  if (SYSERR == sendMessage(TESTBED_ENABLE_HELO,
+                           dst,
                            0,
-                           NULL)) 
+                           NULL))
     return -1;
-  if (SYSERR == readResult(dst, &value)) 
+  if (SYSERR == readResult(dst, &value))
     return -1;
   if (value != OK) {
     XPRINTF(" could enable HELO\n");
@@ -673,18 +673,18 @@
  */
 static int disableAUTOCONNECT(int argc, char *argv[]) {
   int dst, value;
-  
+
   if (argc != 1) {
     XPRINTF("Syntax: autoconnect-disable PEERID\n");
     return -1;
   }
   CHECK_PEER(dst, argv[0]);
-  if (SYSERR == sendMessage(TESTBED_DISABLE_AUTOCONNECT, 
-                           dst, 
+  if (SYSERR == sendMessage(TESTBED_DISABLE_AUTOCONNECT,
+                           dst,
                            0,
-                           NULL)) 
+                           NULL))
     return -1;
-  if (SYSERR == readResult(dst, &value)) 
+  if (SYSERR == readResult(dst, &value))
     return -1;
   if (value != OK) {
     XPRINTF(" could disable AUTOCONNECT\n");
@@ -700,18 +700,18 @@
  */
 static int enableAUTOCONNECT(int argc, char *argv[]) {
   int dst, value;
-  
+
   if (argc != 1) {
     XPRINTF("Syntax: autoconnect-enable PEERID\n");
     return -1;
   }
   CHECK_PEER(dst, argv[0]);
-  if (SYSERR == sendMessage(TESTBED_ENABLE_AUTOCONNECT, 
-                           dst, 
+  if (SYSERR == sendMessage(TESTBED_ENABLE_AUTOCONNECT,
+                           dst,
                            0,
-                           NULL)) 
+                           NULL))
     return -1;
-  if (SYSERR == readResult(dst, &value)) 
+  if (SYSERR == readResult(dst, &value))
     return -1;
   if (value != OK) {
     XPRINTF(" could enable AUTOCONNECT\n");
@@ -730,7 +730,7 @@
   PeerIdentity * list;
   int i;
   int idx = 0;
-  
+
   CHECK_PEER(dst, argv[0]);
   if (argc > (65532 - sizeof(TESTBED_CS_MESSAGE)) / sizeof(PeerIdentity)) {
     XPRINTF("Too many peers specified.  Ask a wizard to enlarge limit.\n");
@@ -738,7 +738,7 @@
   }
 
   list = NULL;
-  for (i=1;i<argc;i++) 
+  for (i=1;i<argc;i++)
     CHECK_PEER(idx, argv[i]); /* may return, do before MALLOC! */
   if (argc > 1)
     list = MALLOC(sizeof(PeerIdentity)*(argc-1));
@@ -749,14 +749,14 @@
           sizeof(PeerIdentity));
   }
   if (SYSERR == sendMessage(type,
-                           dst, 
+                           dst,
                            sizeof(PeerIdentity)*(argc-1),
                            list)) {
     FREENONNULL(list);
-    return -1;  
+    return -1;
   }
   FREENONNULL(list);
-  if (SYSERR == readResult(dst, &value)) 
+  if (SYSERR == readResult(dst, &value))
     return -1;
   if (value != OK) {
     XPRINTF(" could change setting.\n");
@@ -775,7 +775,7 @@
     XPRINTF("Syntax: connect-deny PEERID [PEERID]*\n");
     return -1;
   }
-  return allowDenyConnectHelper(argc, argv, 
+  return allowDenyConnectHelper(argc, argv,
                                TESTBED_DENY_CONNECT);
 }
 
@@ -795,20 +795,20 @@
  * Helper function for (un)loadModule.
  * @param type load or unload requested?
  */
-static int loadModuleHelper(unsigned short type, 
+static int loadModuleHelper(unsigned short type,
                            char * peerId,
                            char * modulename) {
   int ok, dst;
-  
+
   CHECK_PEER(dst, peerId);
-  if (OK != sendMessage(type, 
-                       dst, 
-                       strlen(modulename), 
-                       modulename)) 
-    return -1;  
-  if (OK != readResult(dst, 
-                      &ok)) 
+  if (OK != sendMessage(type,
+                       dst,
+                       strlen(modulename),
+                       modulename))
     return -1;
+  if (OK != readResult(dst,
+                      &ok))
+    return -1;
   if (ok != OK) {
     XPRINTF(" peer %s refused.\n",
           nodes[dst].ips);
@@ -826,7 +826,7 @@
     XPRINTF("Syntax: load-module PEERID MODULENAME\n");
     return -1;
   }
-  return loadModuleHelper(TESTBED_LOAD_MODULE, 
+  return loadModuleHelper(TESTBED_LOAD_MODULE,
                          argv[0],
                          argv[1]);
 }
@@ -849,7 +849,7 @@
  * available via process-output.  The client can be killed
  * using process-signal.  The process identifier is printed.
  */
-static int startProcess(int argc, 
+static int startProcess(int argc,
                        char *argv[]) {
   char * cmdLine;
   int size;
@@ -874,8 +874,8 @@
           strlen(argv[i])+1);
     pos += strlen(argv[i])+1;
   }
-  
-  if (OK != sendMessage(TESTBED_EXEC, 
+
+  if (OK != sendMessage(TESTBED_EXEC,
                        dst,
                        size,
                        cmdLine)) {
@@ -893,13 +893,13 @@
   } else {
     XPRINTF(" Peer could not fork process.\n");
     return -1;
-  }  
+  }
 }
 
 /**
  * Send a signal to a client process.  Use signal
  * 0 to test if the process is still live.  Use
- * -1 to obtain the return value from a dead 
+ * -1 to obtain the return value from a dead
  * process and to free all associated resources.
  * For -1 the return value is printed, otherwise OK.
  * Note that if the signal is -1 and the process
@@ -918,7 +918,7 @@
   CHECK_PEER(dst, argv[0]);
   msg.pid = htonl(atoi(argv[1]));
   msg.signal = htonl(atoi(argv[2]));
-  if (OK != sendMessage(TESTBED_SIGNAL, 
+  if (OK != sendMessage(TESTBED_SIGNAL,
                        dst,
                        sizeof(TESTBED_SIGNAL_MESSAGE) - 
sizeof(TESTBED_CS_MESSAGE),
                        &msg.pid))
@@ -936,13 +936,13 @@
   } else {
     XPRINTF(" Peer could not signal process.\n");
     return -1;
-  }  
+  }
 }
 
 /**
  * Get the recorded output of a process.
  */
-static int dumpProcessOutput(int argc, 
+static int dumpProcessOutput(int argc,
                             char * argv[]) {
   int dst;
   int pid;
@@ -954,7 +954,7 @@
   }
   CHECK_PEER(dst, argv[0]);
   pid = htonl(atoi(argv[1]));
-  if (OK != sendMessage(TESTBED_GET_OUTPUT, 
+  if (OK != sendMessage(TESTBED_GET_OUTPUT,
                        dst,
                        sizeof(int),
                        &pid))
@@ -967,10 +967,10 @@
     unsigned int pos = 0;
     while (pos < ack) {
       unsigned short size;
-      TESTBED_OUTPUT_REPLY_MESSAGE * reply;   
+      TESTBED_OUTPUT_REPLY_MESSAGE * reply;
 
       reply = NULL;
-      if (SYSERR == readFromSocket(&nodes[dst].sock, 
+      if (SYSERR == readFromSocket(&nodes[dst].sock,
                                   (CS_HEADER**)&reply)) {
        XPRINTF(" peer %s is not responding after %d of %d bytes.\n",
               nodes[dst].ips,
@@ -979,23 +979,23 @@
        return -1;
       }
       /* FIXME: check that this is the correct reply format */
-      size = ntohs(reply->header.header.size) - 
sizeof(TESTBED_OUTPUT_REPLY_MESSAGE); 
+      size = ntohs(reply->header.header.size) - 
sizeof(TESTBED_OUTPUT_REPLY_MESSAGE);
       tmp = MALLOC(size+1);
       memcpy(tmp,
             &((TESTBED_OUTPUT_REPLY_MESSAGE_GENERIC*)reply)->data[0],
             size);
       tmp[size] = '\0';
-      XPRINTF("%s", 
-            tmp);           
+      XPRINTF("%s",
+            tmp);      
       FREE(tmp);
       FREE(reply);
-      pos += size;      
-    }    
+      pos += size;
+    }
     return 0;
   } else {
     XPRINTF(" Peer could not return process output.\n");
     return -1;
-  }  
+  }
 }
 
 /**
@@ -1004,7 +1004,7 @@
 static int setBW(int argc, char * argv[]) {
   TESTBED_SET_BW_MESSAGE msg;
   int dst, in, out, ack;
-  
+
   if (argc != 3) {
     XPRINTF("Syntax: set-bw PEERID DOWN-BPS UP-BPS\n");
     return -1;
@@ -1017,13 +1017,13 @@
     return -1;
   }
   msg.in_bw  = htonl(in);
-  msg.out_bw = htonl(out);  
+  msg.out_bw = htonl(out);
   if (SYSERR == sendMessage(TESTBED_SET_BW,
                            dst,
                            sizeof(TESTBED_SET_BW_MESSAGE) - 
sizeof(TESTBED_CS_MESSAGE),
-                           &msg.in_bw)) 
+                           &msg.in_bw))
     return -1;
-  if (OK != readResult(dst, &ack)) 
+  if (OK != readResult(dst, &ack))
     return -1;
   if (ack != OK) {
     XPRINTF(" peer could not set the specified bandwith.\n");
@@ -1045,19 +1045,19 @@
   if (argc != 3) {
     XPRINTF("Syntax: set-loss PEERID DOWN-LOSS UP-LOSS\n");
     return -1;
-  }  
+  }
   CHECK_PEER(dst, argv[0]);
-  msg.percentageLossInbound 
+  msg.percentageLossInbound
     = htonl(atoi(argv[1]));
-  msg.percentageLossOutbound 
+  msg.percentageLossOutbound
     = htonl(atoi(argv[2]));
-  
+
   if (SYSERR == sendMessage(TESTBED_SET_LOSS_RATE,
                            dst,
                            sizeof(TESTBED_SET_LOSS_RATE_MESSAGE) - 
sizeof(TESTBED_CS_MESSAGE),
                            &msg.percentageLossInbound))
     return -1;
-  if (OK != readResult(dst, &ack)) 
+  if (OK != readResult(dst, &ack))
     return -1;
   if (ack != OK) {
     XPRINTF(" peer could not set the specified loss rates.\n");
@@ -1084,10 +1084,10 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return 0 ok, 1 on error
- */   
+ */
 static int getStat(int argc, char ** argv) {
   int res, peer, printProtocols;
-  
+
   printProtocols = NO;
   if (argc != 2) {
     XPRINTF("Syntax: get-stat PEERID STATID\n");
@@ -1140,7 +1140,7 @@
     XPRINTF("\t%d\n",
           type);
   else
-    XPRINTF("\t%d\t(%s)\n", 
+    XPRINTF("\t%d\t(%s)\n",
           type,
           name);
   return OK;
@@ -1152,10 +1152,10 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return 0 ok, 1 on error
- */   
+ */
 static int getStats(int argc, char ** argv) {
   int res, peer, printProtocolsOpt;
-  
+
   printProtocolsOpt = NO;
   if (argc == 2) {
     if (strcmp(argv[0], "-P")) {
@@ -1172,7 +1172,7 @@
   res = requestStatistics(&nodes[peer].sock,
                          (StatisticsProcessor) &printStatistics,
                          NULL);
-  if ( (printProtocolsOpt == YES) && 
+  if ( (printProtocolsOpt == YES) &&
        (res == OK)) {
  lastIp2p = 42; /* not YES or NO */
     res = requestAvailableProtocols(&nodes[peer].sock,
@@ -1192,15 +1192,15 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return 0 ok, 1 on error
- */   
+ */
 static int getOption(int argc, char ** argv) {
   int peer;
   char * opt;
-  
+
   if (argc != 3) {
     XPRINTF("Syntax: get-option PEERID SECTION OPTION\n");
     return -1;
-  }  
+  }
   CHECK_PEER(peer, argv[0]);
   opt = getConfigurationOptionValue(&nodes[peer].sock,
                                    argv[1],
@@ -1220,13 +1220,13 @@
 /**
  * Upload a file to a peer.
  */
-static int uploadFile(int argc, 
+static int uploadFile(int argc,
                      char *argv[]) {
   int peer, nbytes, flen, ack;
   char * buf;
   FILE * infile;
   TESTBED_UPLOAD_FILE_MESSAGE * msg;
-    
+
   if (argc != 3) {
     XPRINTF("Syntax: load-file PEERID LOCAL_FILENAME DEST_FILENAME\n");
     return -1;
@@ -1240,28 +1240,28 @@
   }
   flen = strlen(argv[2]) + 1; /* '\0' added in the flen */
   if (flen > TESTBED_FILE_BLK_SIZE) {
-    XPRINTF(" destination file name too long (%d characters, limit %d).\n", 
+    XPRINTF(" destination file name too long (%d characters, limit %d).\n",
           flen-1,
           TESTBED_FILE_BLK_SIZE);
     return -1;
   }
 
   msg = MALLOC(sizeof(TESTBED_UPLOAD_FILE_MESSAGE) + TESTBED_FILE_BLK_SIZE);
-  msg->header.header.size 
+  msg->header.header.size
     = htons(sizeof(TESTBED_UPLOAD_FILE_MESSAGE)+flen);
-  msg->header.header.type 
+  msg->header.header.type
     = htons(TESTBED_CS_PROTO_REQUEST);
   msg->header.msgType
     = htonl(TESTBED_UPLOAD_FILE);
-  msg->type 
+  msg->type
     = htonl(TESTBED_FILE_DELETE);
   memcpy(((TESTBED_UPLOAD_FILE_MESSAGE_GENERIC*)msg)->buf, argv[2], flen);
-  
-  if (SYSERR == writeToSocket(&nodes[peer].sock, 
+
+  if (SYSERR == writeToSocket(&nodes[peer].sock,
                              &msg->header.header)) {
     fclose(infile);
     FREE(msg);
-    XPRINTF(" Could not send message to peer %s.\n", 
+    XPRINTF(" Could not send message to peer %s.\n",
           nodes[peer].ips);
     return -1;
   }
@@ -1280,7 +1280,7 @@
   }
   msg->type = htonl(TESTBED_FILE_APPEND);
   buf = ((TESTBED_UPLOAD_FILE_MESSAGE_GENERIC*)msg)->buf + flen;
-  while ((nbytes = GN_FREAD(buf, 1, 
+  while ((nbytes = GN_FREAD(buf, 1,
                            (TESTBED_FILE_BLK_SIZE -
                             sizeof(TESTBED_UPLOAD_FILE_MESSAGE) - flen),
                            infile)) > 0) {
@@ -1322,7 +1322,7 @@
 /**
  * Print the list of commands.
  */
-static int printOnlineHelp(int argc, 
+static int printOnlineHelp(int argc,
                           char * argv[]) {
   int i;
   i = 0;
@@ -1347,7 +1347,7 @@
   err = 0;
   end = 0;
   start = 0;
-  while (end < *available) {   
+  while (end < *available) {
     while ( (buffer[end] != '\n') &&
            (end < *available) )
       end++;
@@ -1362,7 +1362,7 @@
        *available -= start;
        return 0;
       }
-    }    
+    }
     up = MALLOC(end-start+1);
     memcpy(up,
           &buffer[start],
@@ -1392,9 +1392,9 @@
               ip[3]);
       argv[0] = ips;
       argv[1] = ports;
-      if (0 != addNode(2, argv)) 
+      if (0 != addNode(2, argv))
        err = 2;
-    } else {      
+    } else {
       char * login;
       login = MALLOC(64);
       if (5 <= sscanf(up,
@@ -1422,7 +1422,7 @@
        argv[0] = login;
        argv[1] = ips;
        argv[2] = ports;
-       if (0 != addSshNode(3, argv)) 
+       if (0 != addSshNode(3, argv))
          err = 2;
       }
       FREE(login);
@@ -1475,10 +1475,10 @@
     }
   } else
     reg = STRDUP(argv[0]);
-  
-  
 
-  proxy = getConfigurationString("GNUNETD", 
+
+
+  proxy = getConfigurationString("GNUNETD",
                                 "HTTP-PROXY");
   if (proxy != NULL) {
     ip = GETHOSTBYNAME(proxy);
@@ -1487,7 +1487,7 @@
             proxy);
       theProxy.sin_addr.s_addr = 0;
     } else {
-      theProxy.sin_addr.s_addr 
+      theProxy.sin_addr.s_addr
        = ((struct in_addr *)ip->h_addr)->s_addr;
       proxyPort = getConfigurationString("GNUNETD",
                                         "HTTP-PROXY-PORT");
@@ -1504,10 +1504,10 @@
   }
 
   if (0 != strncmp(HTTP_URL,
-                  reg, 
+                  reg,
                   strlen(HTTP_URL)) ) {
     XPRINTF(" invalid URL %s (must begin with %s)\n",
-          reg, 
+          reg,
           HTTP_URL);
     return -1;
   }
@@ -1518,16 +1518,16 @@
   j = -1;
   k = -1;
   for (i=0;i<strlen(hostname);i++) {
-    if (hostname[i] == ':') 
+    if (hostname[i] == ':')
       j = i;
     if (hostname[i] == '/') {
       k = i;
       if (j == -1)
-       j = i;      
+       j = i;
       break;
     }
   }
-  if ( (j != -1) && (j < k) ) {   
+  if ( (j != -1) && (j < k) ) {
     char * pstring;
     if (k == -1) {
       pstring = MALLOC(strlen(hostname)-j+1);
@@ -1564,13 +1564,13 @@
 
 
 
-  sock = SOCKET(PF_INET, 
+  sock = SOCKET(PF_INET,
                SOCK_STREAM,
                0);
   if (sock < 0) {
     XPRINTF(" could not open socket for hostlist download (%s).\n",
           STRERROR(errno));
-    FREE(hostname);   
+    FREE(hostname);
     FREE(reg);
     return -1;
   }
@@ -1585,21 +1585,21 @@
       FREE(reg);
       FREE(hostname);
       return -1;
-    }    
-    soaddr.sin_addr.s_addr 
+    }
+    soaddr.sin_addr.s_addr
       = ((struct in_addr*)(ip_info->h_addr))->s_addr;
-    soaddr.sin_port 
+    soaddr.sin_port
       = htons((unsigned short)port);
   } else {
     /* proxy */
-    soaddr.sin_addr.s_addr 
+    soaddr.sin_addr.s_addr
       = theProxy.sin_addr.s_addr;
-    soaddr.sin_port 
+    soaddr.sin_port
       = theProxy.sin_port;
   }
   soaddr.sin_family = AF_INET;
-  if (CONNECT(sock, 
-             (struct sockaddr*)&soaddr, 
+  if (CONNECT(sock,
+             (struct sockaddr*)&soaddr,
              sizeof(soaddr)) < 0) {
     XPRINTF(" failed to send HTTP request to host %s: %s\n",
           hostname,
@@ -1609,10 +1609,10 @@
     CLOSE(sock);
     return -1;
   }
-  
+
   n = strlen(GET_COMMAND) + strlen(reg);
   command = MALLOC(n);
-  SNPRINTF(command, 
+  SNPRINTF(command,
           n,
           GET_COMMAND,
           reg);
@@ -1625,10 +1625,10 @@
     XPRINTF(" failed so send HTTP request %s to host %s (%u - %d) - %s\n",
           command,
           hostname,
-          curpos, 
+          curpos,
           sock,
           STRERROR(errno));
-    FREE(command);    
+    FREE(command);
     FREE(hostname);
     CLOSE(sock);
     return -1;
@@ -1642,7 +1642,7 @@
   curpos = 0;
   while (curpos < 4) {
     int success;
-    
+
     if (start + 5 * cronMINUTES < cronTime(NULL))
       break; /* exit after 5m */
     success = RECV_NONBLOCKING(sock,
@@ -1651,14 +1651,14 @@
                               &ret);
     if ( success == NO ) {
       gnunet_util_sleep(100 * cronMILLIS);
-      continue;    
+      continue;
     }
     if (ret <= 0)
       break; /* end of transmission or error */
-    if ((c=='\r') || (c=='\n')) 
+    if ((c=='\r') || (c=='\n'))
       curpos += ret;
-    else 
-      curpos=0;    
+    else
+      curpos=0;
   }
   if (curpos < 4) { /* invalid response */
     XPRINTF(" exit register (error: no http response read)\n");
@@ -1668,11 +1668,11 @@
 
   /* now read peer list */
   buffer = MALLOC(65536);
-  
 
+
   while (1) {
     int success;
-    
+
     if (start + 300 * cronSECONDS < cronTime(NULL))
       break; /* exit after 300s */
     curpos = 0;
@@ -1682,7 +1682,7 @@
       success = RECV_NONBLOCKING(sock,
                             &buffer[curpos],
                             65536-curpos,
-                            &ret);      
+                            &ret);
       if ( success == NO ) {
         gnunet_util_sleep(20);
        continue;
@@ -1690,7 +1690,7 @@
       if (ret <= 0)
        break; /* end of file or error*/
       curpos += ret;
-    
+
       if (0 != processCommands(buffer, &curpos)) {
        FREE(buffer);
        CLOSE(sock);
@@ -1704,7 +1704,7 @@
     return -1;
   }
   FREE(buffer);
-  CLOSE(sock);  
+  CLOSE(sock);
   return 0;
 }
 
@@ -1732,74 +1732,74 @@
 /* ****************** command set ****************** */
 
 CMD_ENTRY commands[] = {
-  { "help", 
-    "print this help text", 
+  { "help",
+    "print this help text",
     &printOnlineHelp },
   { "get-trust",
-    "", 
+    "",
     &getTrust },
-  { "set-bw", 
-    "", 
+  { "set-bw",
+    "",
     &setBW },
-  { "set-trust", 
-    "", 
+  { "set-trust",
+    "",
     &setTrust },
-  { "add-node", 
-    "add node to testbed, arguments: IP PORT", 
+  { "add-node",
+    "add node to testbed, arguments: IP PORT",
     &addNode },
-  { "add-ssh-node", 
-    "add node to testbed, arguments: LOGIN IP PORT", 
+  { "add-ssh-node",
+    "add node to testbed, arguments: LOGIN IP PORT",
     &addSshNode },
   { "connect",
-    "connect two peers", 
+    "connect two peers",
     &addConnection },
-  { "disconnect", 
-    "disconnect two peers", 
+  { "disconnect",
+    "disconnect two peers",
     &delConnection },
   { "disconnect-all",
-    "destroy all connections between peers", 
+    "destroy all connections between peers",
     &delAllConnections },
-  { "helo-disable", 
+  { "helo-disable",
     "disable HELO advertisements",
     &disableHELO },
-  { "helo-enable", 
-    "enable HELO advertisements", 
+  { "helo-enable",
+    "enable HELO advertisements",
     &enableHELO },
   { "autoconnect-disable", "", &disableAUTOCONNECT },
   { "autoconnect-enable", "", &enableAUTOCONNECT },
-  { "process-start", 
+  { "process-start",
     "Start a process on a given peer.  Prints the process-ID on success.",
     &startProcess },
   { "process-signal",
-    "Send a signal to a process running at a peer.  Use signal 0 to test if 
the process is still running.  Use -1 to obtain the exit code of a process that 
terminated.", 
+    "Send a signal to a process running at a peer.  Use signal 0 to test if 
the process is still running.  Use -1 to obtain the exit code of a process that 
terminated.",
     &signalProcess },
-  { "process-output", 
+  { "process-output",
     "Obtain the process output from a process at a peer.",
     &dumpProcessOutput },
-  { "exit", 
-    "exit the testbed shell", 
+  { "exit",
+    "exit the testbed shell",
     &doExit },
-  { "list-peers", "", &listPeers}, 
+  { "list-peers", "", &listPeers},
   { "set-loss", "", &setLoss} ,
   { "get-stats",
-    "get all stats values from peer", 
-    &getStats }, 
+    "get all stats values from peer",
+    &getStats },
   { "get-stat",
     "get one specific stats value from peer",
-    &getStat }, 
+    &getStat },
   { "get-option",
-    "Get configuration value from peer.", 
+    "Get configuration value from peer.",
     &getOption },
   { "load-module", "", &loadModule },
   { "unload-module", "", &unloadModule },
-  { "add-available", 
+  { "add-available",
     "Check http server for available testbed peers and add"
     " all available nodes.  An optional argument can be"
     " passed to specify the URL of the http server.",
     &addAvailable },
-  { "upload", 
-    "", 
-    &uploadFile }, 
+  { "upload",
+    "",
+    &uploadFile },
   { "connect-deny", "", &denyConnect },
   { "connect-allow", "", &allowConnect },
   { NULL, NULL }, /* termination */

Modified: GNUnet/src/applications/testbed/gnunet-testbed.c
===================================================================
--- GNUnet/src/applications/testbed/gnunet-testbed.c    2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/testbed/gnunet-testbed.c    2005-03-20 23:54:53 UTC 
(rev 464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/testbed/gnunet-testbed.c 
+ * @file applications/testbed/gnunet-testbed.c
  * @brief A Testbed tool for performing distributed experiments
  * @author Ronaldo Alves Ferreira
  * @author Christian Grothoff
@@ -77,36 +77,36 @@
  *
  * @param argc the number of options
  * @param argv the option list (including keywords)
- * @return OK on error, SYSERR if we should exit 
+ * @return OK on error, SYSERR if we should exit
  */
 static int helperParseOptions(int argc, char *argv[]) {
   int c, option_index;
-  
-  FREENONNULL(setConfigurationString("GNUNETD", 
-                                    "LOGFILE", 
+
+  FREENONNULL(setConfigurationString("GNUNETD",
+                                    "LOGFILE",
                                     NULL));
   while (1) {
     static struct GNoption long_options[] = {
       LONG_DEFAULT_OPTIONS,
       { 0,0,0,0 }
-    };    
-    
+    };
+
     option_index = 0;
     c = GNgetopt_long(argc,
-                     argv, 
-                     "vhdc:L:", 
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     argv,
+                     "vhdc:L:",
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
     switch(c) {
-    case 'v': 
+    case 'v':
       printf("GNUnet v%s, gnunet-testbed v%s\n",
             VERSION,
             TESTBED_VERSION);
-      return SYSERR;     
+      return SYSERR;
     case 'h': {
       static Help help[] = {
        HELP_CONFIG,
@@ -119,8 +119,8 @@
                 _("Start GNUnet-testbed helper."),
                 help);
       return SYSERR;
-    }      
-    default: 
+    }
+    default:
       LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
       return -1;
@@ -145,20 +145,20 @@
   int    i, retVal, len, res;
   char  *buf;
   struct sockaddr_in soaddr;
-  
+
   if (SYSERR == initUtil(argc,
                         argv,
                         &helperParseOptions))
     return -1;
 
-  argc = getConfigurationStringList(&argv);  
-  
+  argc = getConfigurationStringList(&argv);
+
   if (argc == 0) {
     fprintf(stderr,
            " must have at least one argument!\n");
     return -1;
-  }  
-  sock = SOCKET(PF_INET, 
+  }
+  sock = SOCKET(PF_INET,
                SOCK_STREAM,
                6); /* 6: TCP */
   if (sock == -1) {
@@ -169,12 +169,12 @@
     = AF_INET;
   soaddr.sin_addr.s_addr
     = htonl(INADDR_LOOPBACK);
-  soaddr.sin_port 
+  soaddr.sin_port
     = htons(PORT);
   res = CONNECT(sock,
-               (struct sockaddr*)&soaddr, 
+               (struct sockaddr*)&soaddr,
                sizeof(soaddr));
-  if ( (res < 0) && 
+  if ( (res < 0) &&
        (errno != EINPROGRESS) ) {
     LOG(LOG_INFO,
        _("Cannot connect to LOOPBACK port %d: %s\n"),
@@ -184,24 +184,24 @@
     sock = -1;
     return SYSERR;
   }
-  
+
   /* write command to socket */
   socketSend(strlen(argv[0]),
-            SOCKET_BEGIN_COMMAND, 
+            SOCKET_BEGIN_COMMAND,
             argv[0]);
   FREE(argv[0]);
   /* write args to socket */
   for (i=1;i<argc;i++) {
-    socketSend(strlen(argv[i]), 
-              SOCKET_ADD_ARGUMENT, 
+    socketSend(strlen(argv[i]),
+              SOCKET_ADD_ARGUMENT,
               argv[i]);
     FREE(argv[i]);
   }
   FREE(argv);
   socketSend(0,
-            SOCKET_END_COMMAND, 
+            SOCKET_END_COMMAND,
             NULL);
-  
+
   /* read result from socket, print to stderr,  obtain retVal */
   i = SOCKET_PRINTF;
   buf = NULL;
@@ -210,13 +210,13 @@
     buf = NULL;
     i = readSocket(&buf, &len);
     if (i == SOCKET_PRINTF)
-      fprintf(stdout, 
-             "%.*s", 
-             (int) len, 
+      fprintf(stdout,
+             "%.*s",
+             (int) len,
              buf);
-  }  
+  }
   retVal = *(int*)buf;
-  FREE(buf);  
+  FREE(buf);
   CLOSE(sock);
   return retVal;
 }
@@ -246,13 +246,13 @@
     "-i",
     NULL,
   };
-  
+
   configFile = getConfigurationString("FILES",
                                      "gnunet.conf");
   GNUNET_ASSERT(configFile != NULL);
   argv[0] = SHELL;
   aliases = FOPEN(TB_ALIASES, "w+");
-  fprintf(aliases, 
+  fprintf(aliases,
          "export PS1=\"[GTB]%% \"\n");
   i=0;
   while (commands[i].command != NULL) {
@@ -273,8 +273,8 @@
   }
   FREE(configFile);
   fclose(aliases);
-  doneUtil(); 
-  execvp(SHELL, argv);       
+  doneUtil();
+  execvp(SHELL, argv);
   fprintf(stderr,
          _("Could not execute '%s': %s\n"),
          SHELL,
@@ -289,7 +289,7 @@
 /**
  * Is this IP labeled as trusted for CS connections?
  */
-static int isWhitelisted(IPaddr ip) {   
+static int isWhitelisted(IPaddr ip) {
   return checkIPListed(trustedNetworks_,
                       ip);
 }
@@ -312,56 +312,56 @@
   sigset_t set;
   sigset_t oset;
 
-  
+
   /* create the socket */
  CREATE_SOCKET:
   while ( (ssock = SOCKET(PF_INET, SOCK_STREAM, 0)) < 0) {
     LOG_STRERROR(LOG_ERROR, "socket");
-    LOG(LOG_ERROR, 
+    LOG(LOG_ERROR,
        _("No client service started. Trying again in 30 seconds.\n"));
     sleep(30);
   }
-  
+
   serverAddr.sin_family
     = AF_INET;
-  serverAddr.sin_addr.s_addr 
+  serverAddr.sin_addr.s_addr
     = htonl(INADDR_ANY);
   serverAddr.sin_port
     = htons(PORT);
-  
-  if (SETSOCKOPT(ssock, 
+
+  if (SETSOCKOPT(ssock,
                 SOL_SOCKET,
                 SO_REUSEADDR,
                 &on,
                 sizeof(on)) < 0)
     LOG_STRERROR(LOG_ERROR, "setsockopt");
-  
+
   /* bind the socket */
   if (BIND(ssock,
           (struct sockaddr*)&serverAddr,
           sizeof(serverAddr)) < 0) {
-    LOG(LOG_ERROR, 
+    LOG(LOG_ERROR,
        _("Error (%s) binding the TCP listener to "
          "port %d. No proxy service started.\nTrying "
          "again in %d seconds...\n"),
        STRERROR(errno),
-       PORT, 
+       PORT,
        secs);
     sleep(secs);
     secs += 5; /* slow progression... */
     CLOSE(ssock);
     goto CREATE_SOCKET;
   }
-  
+
   do_quit = NO;
-  /* signal handler is needed if the child did exit 
+  /* signal handler is needed if the child did exit
      (e.g. with CTRL-D and not with the command 'exit') */
   newAct.sa_sigaction = &sigChildHandler;
   sigfillset(&newAct.sa_mask);
   newAct.sa_flags = SA_NOCLDSTOP | SA_SIGINFO | SA_RESTART;
   if (0 != sigaction(SIGCHLD,
                     &newAct,
-                    &oldAct)) 
+                    &oldAct))
     DIE_STRERROR("sigaction");
   sigemptyset(&set);
   sigaddset(&set, SIGCHLD);
@@ -371,8 +371,8 @@
     DIE_STRERROR("sigprocmask");
   LISTEN(ssock, 5);
   while ( (do_quit == NO) &&
-         (0 == waitpid(bash_pid, 
-                       &status, 
+         (0 == waitpid(bash_pid,
+                       &status,
                        WNOHANG)) ) {
     int   argc;
     char *command;
@@ -383,8 +383,8 @@
     fd_set wset;
     fd_set eset;
     IPaddr ipaddr;
-    
-    lenOfIncomingAddr = sizeof(clientAddr); 
+
+    lenOfIncomingAddr = sizeof(clientAddr);
     /* accept is not interrupted by SIGCHLD,
        so we must do a select first; yuck. */
     FD_ZERO(&rset);
@@ -405,7 +405,7 @@
     GNUNET_ASSERT(sizeof(struct in_addr) == sizeof(IPaddr));
     memcpy(&ipaddr,
           &clientAddr.sin_addr,
-          sizeof(struct in_addr));   
+          sizeof(struct in_addr));
     if (NO == isWhitelisted(ipaddr)) {
       LOG(LOG_WARNING,
          _("Rejected unauthorized connection from %u.%u.%u.%u.\n"),
@@ -417,7 +417,7 @@
 
     /* read from socket, run reaction,
        return result value and stdout value;
-       possibly set doExit to 1 to exit */    
+       possibly set doExit to 1 to exit */
     buf = NULL;
     if (SOCKET_BEGIN_COMMAND != readSocket(&buf, &len)) {
       fprintf(stderr,
@@ -427,7 +427,7 @@
     }
     command = MALLOC(len+1);
     memcpy(command, buf, len);
-    command[len] = '\0';    
+    command[len] = '\0';
     argc = 0;
     args = NULL;
     FREE(buf);
@@ -435,7 +435,7 @@
     while (SOCKET_ADD_ARGUMENT == readSocket(&buf, &len)) {
       GROW(args, argc, argc+1);
       args[argc-1] = MALLOC(len+1);
-      memcpy(args[argc-1], buf, len);       
+      memcpy(args[argc-1], buf, len);  
       args[argc-1][len] = '\0';
       FREE(buf);
       buf = NULL;
@@ -446,7 +446,7 @@
       if (0 == strcmp(commands[i].command, command)) {
        int ret;
        ret = commands[i].handler(argc, args);
-       socketSend(sizeof(unsigned int), 
+       socketSend(sizeof(unsigned int),
                   SOCKET_RETVAL,
                   &ret);
        break;
@@ -462,23 +462,23 @@
       i = -1;
       PRINTF(_("Command '%s' not found!\n"),
             command);
-      socketSend(sizeof(unsigned int), 
-                SOCKET_RETVAL, 
+      socketSend(sizeof(unsigned int),
+                SOCKET_RETVAL,
                 &i);
     }
-    FREE(command);    
+    FREE(command);
     CLOSE(sock);
     sock = -1;
   }
   /* just to be certain, we could have
      left the main loop due to doExit... */
-  waitpid(bash_pid, 
-         &status, 
+  waitpid(bash_pid,
+         &status,
          WNOHANG);
   /* restore... */
   if (0 != sigaction(SIGCHLD,
                     &oldAct,
-                    &newAct)) 
+                    &newAct))
     LOG_STRERROR(LOG_WARNING, "sigaction");
   return status;
 }
@@ -493,11 +493,11 @@
  *
  * @param argc the number of options
  * @param argv the option list (including keywords)
- * @return OK on error, SYSERR if we should exit 
+ * @return OK on error, SYSERR if we should exit
  */
 static int parseOptions(int argc, char *argv[]) {
   int c, option_index;
-  
+
   FREENONNULL(setConfigurationString("GNUNETD",
                                     "LOGFILE",
                                     NULL));
@@ -505,25 +505,25 @@
     static struct GNoption long_options[] = {
       LONG_DEFAULT_OPTIONS,
       { 0,0,0,0 }
-    };    
-    
+    };
+
     option_index = 0;
     c = GNgetopt_long(argc,
-                     argv, 
-                     "vhdc:L:", 
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     argv,
+                     "vhdc:L:",
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
     switch(c) {
-    case 'v': 
+    case 'v':
       printf("GNUnet v%s, gnunet-testbed v%s\n",
             VERSION,
             TESTBED_VERSION);
       return SYSERR;
-      
+
     case 'h': {
       static Help help[] = {
        HELP_CONFIG,
@@ -536,8 +536,8 @@
                 _("Start GNUnet testbed controller."),
                 help);
       return SYSERR;
-    }      
-    default: 
+    }
+    default:
       LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
       return -1;
@@ -549,7 +549,7 @@
 /* **************** main **************** */
 
 /**
- * Create a testbed environment with multiple peers to collect 
+ * Create a testbed environment with multiple peers to collect
  * GNUnet statistics.  Note that the same binary is used for
  * two distinct purposes.  One is the stateful master process
  * that maintains the testbed.  A second type of process is
@@ -560,12 +560,12 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return 0 on success, -1 on error
- */   
+ */
 int main(int argc, char *argv[]) {
 #ifndef MINGW /* FIXME MINGW */
   pid_t pid;
   char * ch;
-  
+
   testbedArg0 = expandFileName(argv[0]);
   /* first, evaluate if we are the special
      helper process.  If so, eat HELPER
@@ -576,27 +576,27 @@
       return helper_main(argc -1, &argv[1]);
     }
   }
-  
+
   if (SYSERR == initUtil(argc, argv, &parseOptions))
-    return -1; 
+    return -1;
 
   ch = getConfigurationString("GNUNET-TESTBED",
                              "TRUSTED");
   if (ch == NULL) {
     trustedNetworks_ = parseRoutes("127.0.0.0/8;"); /* by default, trust 
localhost only */
   } else {
-    trustedNetworks_ = parseRoutes(ch);    
-    if (trustedNetworks_ == NULL) 
+    trustedNetworks_ = parseRoutes(ch);
+    if (trustedNetworks_ == NULL)
       errexit(_("Malformed entry in the configuration in section %s under %s: 
%s\n"),
              "GNUNET-TESTBED",
-             "TRUSTED", 
-             ch); 
+             "TRUSTED",
+             ch);
     FREE(ch);
   }
-  
+
   /* we are the main testbed process.  Fork of
      a shell and start processing from the socket */
-  
+
   pid = fork();
   if (pid < 0)
     DIE_STRERROR("fork");
@@ -616,8 +616,8 @@
     UNLINK(TB_ALIASES);
     FREE(testbedArg0);
     return ret;
-  } 
+  }
 #endif
 }
 
-/* end of gnunet-testbed.c */ 
+/* end of gnunet-testbed.c */

Modified: GNUnet/src/applications/testbed/socket.c
===================================================================
--- GNUnet/src/applications/testbed/socket.c    2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/testbed/socket.c    2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/testbed/socket.c 
+ * @file applications/testbed/socket.c
  * @brief socket operation for communication between the testbed processes
  * @author Ronaldo Alves Ferreira
  * @author Christian Grothoff
@@ -36,8 +36,8 @@
 
 int sock = -1;
 
-static void writeAll(int fd, 
-                    char * data, 
+static void writeAll(int fd,
+                    char * data,
                     unsigned int len) {
   unsigned int pos;
   int ret;
@@ -45,7 +45,7 @@
   ret = 42;
   while ( (ret > 0) && (pos < len) ) {
     ret = WRITE(sock, &data[pos], len-pos);
-    if (ret > 0) 
+    if (ret > 0)
       pos += ret;
     else
       LOG_STRERROR(LOG_WARNING, "write");
@@ -60,29 +60,29 @@
   char data[0];
 } ExchangeBuffer;
 
-void socketSend(unsigned int len, 
-               unsigned int type, 
+void socketSend(unsigned int len,
+               unsigned int type,
                void * data) {
   ExchangeBuffer * buf;
   unsigned int tlen;
 #if DEBUG
   unsigned int i;
 #endif
-  
-  tlen = len + sizeof(ExchangeBuffer); 
+
+  tlen = len + sizeof(ExchangeBuffer);
   buf = MALLOC(tlen);
   if (len > 0)
     memcpy(&buf->data[0], data, len);
   buf->size = htonl(tlen);
   buf->type = htonl(type);
-  
+
 #if DEBUG
   printf("Sending %u bytes: ", tlen);
   for (i=0;i<tlen;i++)
     printf("%d ", ((char*)buf)[i]);
   printf("\n");
 #endif
-  
+
   writeAll(sock, (void*)buf, tlen);
   FREE(buf);
 }
@@ -91,38 +91,38 @@
  * Read a message from the socket.
  * @return the type of the message
  */
-unsigned int readSocket(char ** rbuf, 
+unsigned int readSocket(char ** rbuf,
                        unsigned int * len) {
-  unsigned int type;  
+  unsigned int type;
   ExchangeBuffer * buf;
   unsigned int pos;
   int ret;
   unsigned int mlen;
-  
+
 #if DEBUG
   unsigned int i;
-#endif  
-  
+#endif
+
   pos = 0;
   ret = 42;
   while ( (pos < sizeof(unsigned int)) && (ret >= 0) ) {
     ret = READ(sock, &((char*)&mlen)[pos], sizeof(unsigned int)-pos);
-    if (ret >= 0) 
+    if (ret >= 0)
       pos += ret;
     else
       DIE_STRERROR("read");
   }
   mlen = ntohl(mlen);
-  
+
   buf = MALLOC(mlen);
   while ( (pos < mlen) && (ret >= 0) ) {
     ret = READ(sock, &((char*)buf)[pos], mlen-pos);
-    if (ret >= 0) 
+    if (ret >= 0)
       pos += ret;
     else
       DIE_STRERROR("read");
   }
-  
+
 #if DEBUG
   buf->size = htonl(mlen);
   printf("Reading %u bytes: ", mlen);
@@ -130,7 +130,7 @@
     printf("%d ", ((char*)buf)[i]);
   printf("\n");
 #endif
-  
+
   type = ntohl(buf->type);
   *rbuf = MALLOC(mlen - sizeof(ExchangeBuffer));
   memcpy(*rbuf, &buf->data[0], mlen - sizeof(ExchangeBuffer));
@@ -142,12 +142,12 @@
 /**
  * Print a message in the testbed-shell.
  */
-void XPRINTF(char * fmt, ...) {  
-  va_list      args;  
+void XPRINTF(char * fmt, ...) {
+  va_list      args;
   int n;
   int size = 1024;
   char * p;
-  
+
   p = MALLOC(size);
   while (1) {
     /* Try to print in the allocated space. */

Modified: GNUnet/src/applications/testbed/socket.h
===================================================================
--- GNUnet/src/applications/testbed/socket.h    2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/testbed/socket.h    2005-03-20 23:54:53 UTC (rev 
464)
@@ -43,14 +43,14 @@
 void socketSend(unsigned int len,
                unsigned int type,
                void * data);
- 
+
 /**
  * Read a message from the socket.
  * @return the type of the message
  */
 unsigned int readSocket(char ** rbuf,
                        unsigned int * len);
- 
+
 void XPRINTF(char * fmt,
            ...);
 

Modified: GNUnet/src/applications/testbed/testbed.c
===================================================================
--- GNUnet/src/applications/testbed/testbed.c   2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/testbed/testbed.c   2005-03-20 23:54:53 UTC (rev 
464)
@@ -64,13 +64,13 @@
 /**
  * Connect to another peer.
  */
-static void tb_ADD_PEER(ClientHandle client, 
+static void tb_ADD_PEER(ClientHandle client,
                        TESTBED_CS_MESSAGE * msg) {
   p2p_HEADER noise;
-  TESTBED_ADD_PEER_MESSAGE * hm 
+  TESTBED_ADD_PEER_MESSAGE * hm
     = (TESTBED_ADD_PEER_MESSAGE*) msg;
-  
-  LOG(LOG_DEBUG, 
+
+  LOG(LOG_DEBUG,
       " tb_ADD_PEER\n");
   if (sizeof(TESTBED_ADD_PEER_MESSAGE) >
       ntohs(msg->header.size) ) {
@@ -86,13 +86,13 @@
        "_ADD_PEER");
     return;
   }
-  
+
   identity->addHost(&hm->helo);
   noise.size = htons(sizeof(p2p_HEADER));
   noise.type = htons(p2p_PROTO_NOISE);
   coreAPI->unicast(&hm->helo.senderIdentity,
                   &noise,
-                  EXTREME_PRIORITY, 
+                  EXTREME_PRIORITY,
                   0);
   sendAcknowledgement(client, OK);
 }
@@ -128,26 +128,26 @@
                        TESTBED_GET_HELO_MESSAGE * msg) {
   HELO_Message * helo;
   unsigned int proto = ntohs(msg->proto);
-  
-  if (SYSERR == identity->identity2Helo(coreAPI->myIdentity, 
+
+  if (SYSERR == identity->identity2Helo(coreAPI->myIdentity,
                                        proto,
-                                       NO, 
+                                       NO,
                                        &helo)) {
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("TESTBED could not generate HELO message for protocol %u\n"),
        proto);
     sendAcknowledgement(client, SYSERR);
   } else {
-    TESTBED_HELO_MESSAGE * reply 
+    TESTBED_HELO_MESSAGE * reply
       = MALLOC(ntohs(helo->header.size) + sizeof(TESTBED_CS_MESSAGE));
-    reply->header.header.size 
+    reply->header.header.size
       = htons(ntohs(helo->header.size) + sizeof(TESTBED_CS_MESSAGE));
-    reply->header.header.type 
+    reply->header.header.type
       = htons(TESTBED_CS_PROTO_REPLY);
     reply->header.msgType
       = htonl(TESTBED_HELO_RESPONSE);
-    memcpy(&reply->helo, 
-          helo, 
+    memcpy(&reply->helo,
+          helo,
           ntohs(helo->header.size));
     coreAPI->sendToClient(client,
                          &reply->header.header);
@@ -156,7 +156,7 @@
        __FUNCTION__);
     FREE(helo);
     FREE(reply);
-  }    
+  }
 }
 
 /**
@@ -165,20 +165,20 @@
 static void tb_SET_TVALUE(ClientHandle client,
                          TESTBED_SET_TVALUE_MESSAGE * msg) {
   int trust;
-  
+
   trust = ntohl(msg->trust);
-  identity->changeHostTrust(&msg->otherPeer, 
+  identity->changeHostTrust(&msg->otherPeer,
                            trust);
   sendAcknowledgement(client, OK);
 }      
-                 
+               
 /**
  * Get a trust value.
  */
 static void tb_GET_TVALUE(ClientHandle client,
-                         TESTBED_GET_TVALUE_MESSAGE * msg) {    
+                         TESTBED_GET_TVALUE_MESSAGE * msg) {
   unsigned int trust;
-  
+
   trust = identity->getHostTrust(&msg->otherPeer);
   sendAcknowledgement(client, trust);
 }      
@@ -191,14 +191,14 @@
   LOG(LOG_DEBUG,
       "gnunet-testbed: tb_SET_BW\n");
   setConfigurationInt("LOAD",
-                     "MAXNETDOWNBPSTOTAL", 
+                     "MAXNETDOWNBPSTOTAL",
                      ntohl(msg->in_bw));
   setConfigurationInt("LOAD",
-                     "MAXNETUPBPSTOTAL", 
+                     "MAXNETUPBPSTOTAL",
                      ntohl(msg->out_bw));
   triggerGlobalConfigurationRefresh();
   sendAcknowledgement(client, OK);
-}                
+}              
 
 /**
  * Load an application module.
@@ -208,22 +208,22 @@
   unsigned short size;
   char * name;
   int ok;
-  
+
   size = ntohs(msg->header.size);
   if (size <= sizeof(TESTBED_CS_MESSAGE) ) {
     LOG(LOG_WARNING,
        _("received invalid '%s' message\n"),
        "LOAD_MODULE");
     return;
-  } 
-  
+  }
+
   if (! testConfigurationString("TESTBED",
                                "ALLOW_MODULE_LOADING",
                                "YES")) {
     sendAcknowledgement(client, SYSERR);
     return;
   }
-  
+
   name = STRNDUP(&((TESTBED_LOAD_MODULE_MESSAGE_GENERIC*)msg)->modulename[0],
                 size - sizeof(TESTBED_CS_MESSAGE));
   if (strlen(name) == 0) {
@@ -249,21 +249,21 @@
   unsigned short size;
   char * name;
   int ok;
-  
+
   size = ntohs(msg->header.size);
   if (size <= sizeof(TESTBED_CS_MESSAGE) ) {
     LOG(LOG_WARNING,
        _("received invalid '%s' message\n"),
        "UNLOAD_MODULE");
     return;
-  }  
+  }
   if (! testConfigurationString("TESTBED",
                                "ALLOW_MODULE_LOADING",
-                               "YES")) {      
+                               "YES")) {
     sendAcknowledgement(client, SYSERR);
     return;
   }
-  
+
   name = STRNDUP(&((TESTBED_UNLOAD_MODULE_MESSAGE_GENERIC*)msg)->modulename[0],
                 size - sizeof(TESTBED_CS_MESSAGE));
   if (strlen(name) == 0) {
@@ -439,22 +439,22 @@
   /** errno after fork */
   int errno_;
   /** the PID of the process */
-  pid_t pid; 
+  pid_t pid;
   /** stdout and stderr of the process */
   int outputPipe;
   /** thread that reads the output of the process */
   PTHREAD_T reader;
   /** how many bytes of output did the process produce? */
   int outputSize;
-  /** the output of the process */ 
-  char * output; 
+  /** the output of the process */
+  char * output;
   /** did the process exit? (YES/NO) */
-  int hasExited; 
+  int hasExited;
   /** if the process did exit, what was the status? (or errno of execve) */
-  int exitStatus; 
+  int exitStatus;
   /** semaphore used to communicate thread-start */
   Semaphore * sem;
-  /** Client responsible for this process 
+  /** Client responsible for this process
       (if that client disconnects, the process
       will be killed!) */
   ClientHandle client;
@@ -521,15 +521,15 @@
   pi->errno_ = errno;
   if (pi->pid == 0) {
     /* make pipe stdout/stderr */
-    
+
     CLOSE(fd[0]);
     CLOSE(1);
     CLOSE(2);
     if (-1 == dup2(fd[1], 1))
       LOG_STRERROR(LOG_ERROR, "dup2");
     if (-1 == dup2(fd[1], 2))
-      LOG_STRERROR(LOG_ERROR, "dup2");    
-    CLOSE(fd[1]); 
+      LOG_STRERROR(LOG_ERROR, "dup2");
+    CLOSE(fd[1]);
     CHDIR(dir);
     FREE(dir);
     execvp(pi->argv[0],
@@ -563,7 +563,7 @@
   GROW(pt,
        ptSize,
        ptSize+1);
-  pt[ptSize-1] = pi;  
+  pt[ptSize-1] = pi;
   SEMAPHORE_UP(pi->sem);
   MUTEX_UNLOCK(&lock);
 
@@ -598,7 +598,7 @@
     LOG_STRERROR(LOG_WARNING, "waitpid");
     pi->exitStatus = errno;
   }
-  pi->hasExited = YES;    
+  pi->hasExited = YES;
   MUTEX_UNLOCK(&lock);
   return 0;
 }
@@ -624,9 +624,9 @@
     LOG(LOG_WARNING,
        _("received invalid '%s' message: %s.\n"),
        "EXEC",
-       (size <= sizeof(TESTBED_CS_MESSAGE)) 
+       (size <= sizeof(TESTBED_CS_MESSAGE))
        ? "size smaller or equal than TESTBED_CS_MESSAGE"
-       : "last character in command line is not zero-terminator"); 
+       : "last character in command line is not zero-terminator");
     sendAcknowledgement(client, SYSERR);
     return;
   }
@@ -640,9 +640,9 @@
   clientConfig = NULL;
   if (0 == strncmp("gnunet",
                   mainName,
-                  strlen("gnunet"))) 
+                  strlen("gnunet")))
     clientConfig = getConfigurationString("TESTBED",
-                                         "CLIENTCONFIG"); 
+                                         "CLIENTCONFIG");
   if (clientConfig != NULL)
     pi->argc +=2;
   argc2 = pi->argc;
@@ -702,7 +702,7 @@
   MUTEX_LOCK(&lock);
   for (i=0;i<ptSize;i++) {
     pi = pt[i];
-    if (pi->uid != uid) 
+    if (pi->uid != uid)
       continue;
     if (sig == -1) {   
       if (pi->hasExited == NO) {
@@ -722,8 +722,8 @@
             ptSize-1);
       }
     } else {
-      if (pi->hasExited == NO) {      
-       if (0 == kill(pi->pid, 
+      if (pi->hasExited == NO) {
+       if (0 == kill(pi->pid,
                      ntohl(msg->signal)))
          ret = OK;
        else
@@ -755,11 +755,11 @@
       TESTBED_OUTPUT_REPLY_MESSAGE * msg;
 
       msg = MALLOC(65532);
-      msg->header.header.type 
+      msg->header.header.type
        = htons(TESTBED_CS_PROTO_REPLY);
-      msg->header.msgType 
+      msg->header.msgType
        = htonl(TESTBED_OUTPUT_RESPONSE);
-      
+
       sendAcknowledgement(client, pi->outputSize);
       pos = 0;
       while (pos < pi->outputSize) {   
@@ -783,7 +783,7 @@
       MUTEX_UNLOCK(&lock);
       return;
     }
-  } 
+  }
   MUTEX_UNLOCK(&lock);
   sendAcknowledgement(client, SYSERR);
 }
@@ -799,8 +799,8 @@
   char * end;
   char * tmp;
   FILE *outfile;
-  
-  LOG(LOG_DEBUG, 
+
+  LOG(LOG_DEBUG,
       "tb_UPLOAD_FILE\n");
   if (sizeof(TESTBED_UPLOAD_FILE_MESSAGE) > ntohs(msg->header.header.size)) {
     LOG(LOG_ERROR,
@@ -823,14 +823,14 @@
   if (s == filename) {
     /* filename empty, not allowed! */
     LOG(LOG_ERROR,
-       _("Empty filename for UPLOAD_FILE message is invalid!\n")); 
+       _("Empty filename for UPLOAD_FILE message is invalid!\n"));
     sendAcknowledgement(client, SYSERR);
     return;
   }
   if (s == end) {
     /* filename empty, not allowed! */
     LOG(LOG_ERROR,
-       _("Filename for UPLOAD_FILE message is not null-terminated 
(invalid!)\n")); 
+       _("Filename for UPLOAD_FILE message is not null-terminated 
(invalid!)\n"));
     sendAcknowledgement(client, SYSERR);
     return;
   }
@@ -845,11 +845,11 @@
   gnHome = expandFileName(tmp);
   FREE(tmp);
   mkdirp(gnHome);
-  
-  filename = MALLOC(strlen(filename) + strlen(gnHome) + 2); /*2: /, \0 */ 
+
+  filename = MALLOC(strlen(filename) + strlen(gnHome) + 2); /*2: /, \0 */
   strcpy(filename, gnHome);
   strcat(filename, "/");
-  strncat(filename, 
+  strncat(filename,
          ((TESTBED_UPLOAD_FILE_MESSAGE_GENERIC*)msg)->buf,
          end - ((TESTBED_UPLOAD_FILE_MESSAGE_GENERIC*)msg)->buf);
   if (htonl(msg->type) == TESTBED_FILE_DELETE) {
@@ -861,7 +861,7 @@
     FREE(filename);
     sendAcknowledgement(client, ack);
     return;
-  }   
+  }
   if (htonl(msg->type) != TESTBED_FILE_APPEND) {
     LOG(LOG_ERROR,
        _("Invalid message received at %s:%d."),
@@ -869,7 +869,7 @@
        __LINE__);
     FREE(filename);
     return;
-  }   
+  }
   outfile = FOPEN(filename, "ab");
   if (outfile == NULL) {
     /* Send nack back to control point. */
@@ -879,10 +879,10 @@
     return;
   }
   FREE(filename);
-  s    = ((TESTBED_UPLOAD_FILE_MESSAGE_GENERIC*)msg)->buf 
+  s    = ((TESTBED_UPLOAD_FILE_MESSAGE_GENERIC*)msg)->buf
     + strlen(((TESTBED_UPLOAD_FILE_MESSAGE_GENERIC*)msg)->buf) + 1; /* \0 
added */
   size = ntohs(msg->header.header.size) -
-    sizeof(TESTBED_UPLOAD_FILE_MESSAGE) - 
+    sizeof(TESTBED_UPLOAD_FILE_MESSAGE) -
     (strlen(((TESTBED_UPLOAD_FILE_MESSAGE_GENERIC*)msg)->buf)+1);
   if (GN_FWRITE(s, 1, size, outfile) != size)
     ack = SYSERR;
@@ -894,7 +894,7 @@
 
 /**
  * General type of a message handler.
- */                      
+ */                    
 typedef void (*THandler)(ClientHandle client,
                         TESTBED_CS_MESSAGE * msg);
 
@@ -903,28 +903,28 @@
  */
 typedef struct HD_ {
     /**
-     * function that handles these types of messages 
+     * function that handles these types of messages
      */
-    THandler handler; 
+    THandler handler;
 
     /**
      * Expected size of messages for this handler.  Checked by caller.  Use
      * 0 for variable size, in that case, the handler must check.
      */
-    unsigned short expectedSize; 
+    unsigned short expectedSize;
 
     /**
-     * Textual description of the handler for debugging 
+     * Textual description of the handler for debugging
      */
-    char * description; 
-    
+    char * description;
+
     /**
-     * The message-ID of the handler.  Used only for checking that 
+     * The message-ID of the handler.  Used only for checking that
      * the handler array matches the message IDs defined in testbed.h.
      * Must be equal to the index in the handler array that yields
      * this entry.
      */
-    unsigned int msgId; 
+    unsigned int msgId;
 } HD;
 
 /* some macros to make initializing the handlers array extremely brief. */
@@ -939,13 +939,13 @@
 static HD handlers[] = {
   TBSENTRY(undefined), /* For IDs that should never be received */
   TBDENTRY(ADD_PEER),  /* RF: Why was this as TBDENTRY? Because HELO is 
variable size! */
-  TBSENTRY(DEL_PEER), 
+  TBSENTRY(DEL_PEER),
   TBSENTRY(DEL_ALL_PEERS),
-  TBSENTRY(GET_HELO), 
-  TBSENTRY(SET_TVALUE), 
-  TBSENTRY(GET_TVALUE), 
-  TBSENTRY(undefined), 
-  TBSENTRY(SET_BW), 
+  TBSENTRY(GET_HELO),
+  TBSENTRY(SET_TVALUE),
+  TBSENTRY(GET_TVALUE),
+  TBSENTRY(undefined),
+  TBSENTRY(SET_BW),
   TBDENTRY(LOAD_MODULE),
   TBDENTRY(UNLOAD_MODULE),
   TBDENTRY(UPLOAD_FILE),
@@ -974,9 +974,9 @@
   TESTBED_CS_MESSAGE * msg;
   unsigned short size;
   unsigned int id;
-  
+
 #if DEBUG_TESTBED
-  LOG(LOG_DEBUG, 
+  LOG(LOG_DEBUG,
       "TESTBED handleTestbedRequest\n");
 #endif
   size = ntohs(message->size);
@@ -991,23 +991,23 @@
   if (id < TESTBED_MAX_MSG) {
     if ( (handlers[id].expectedSize == 0) ||
         (handlers[id].expectedSize == size) ) {
-      LOG(LOG_DEBUG, 
+      LOG(LOG_DEBUG,
          "TESTBED received message of type %u.\n",
          id);
-      
+
       handlers[id].handler(client, msg);
-      
+
     } else {
       LOG(LOG_ERROR,
          _("Received testbed message of type %u but unexpected size %u, 
expected %u\n"),
-         id, 
+         id,
          size,
          handlers[id].expectedSize);
     }
   } else {
     tb_undefined(client, msg);
   }
-} 
+}
 
 /**
  * Register this testbed peer with the central testbed server.
@@ -1047,17 +1047,17 @@
     return;
   }
 
-  proxy = getConfigurationString("GNUNETD", 
+  proxy = getConfigurationString("GNUNETD",
                                 "HTTP-PROXY");
   if (proxy != NULL) {
     ip = GETHOSTBYNAME(proxy);
     if (ip == NULL) {
-      LOG(LOG_ERROR, 
+      LOG(LOG_ERROR,
          _("Could not resolve name of HTTP proxy '%s'.\n"),
          proxy);
       theProxy.sin_addr.s_addr = 0;
     } else {
-      theProxy.sin_addr.s_addr 
+      theProxy.sin_addr.s_addr
        = ((struct in_addr *)ip->h_addr)->s_addr;
       proxyPort = getConfigurationString("GNUNETD",
                                         "HTTP-PROXY-PORT");
@@ -1074,11 +1074,11 @@
   }
 
   if (0 != strncmp(HTTP_URL,
-                  reg, 
+                  reg,
                   strlen(HTTP_URL)) ) {
-    LOG(LOG_WARNING, 
-       _("Invalid URL '%s' (must begin with '%s')\n"), 
-       reg, 
+    LOG(LOG_WARNING,
+       _("Invalid URL '%s' (must begin with '%s')\n"),
+       reg,
        HTTP_URL);
     return;
   }
@@ -1089,16 +1089,16 @@
   j = -1;
   k = -1;
   for (i=0;i<strlen(hostname);i++) {
-    if (hostname[i] == ':') 
+    if (hostname[i] == ':')
       j = i;
     if (hostname[i] == '/') {
       k = i;
       if (j == -1)
-       j = i;      
+       j = i;
       break;
     }
   }
-  if ( (j != -1) && (j < k) ) {   
+  if ( (j != -1) && (j < k) ) {
     char * pstring;
     if (k == -1) {
       pstring = MALLOC(strlen(hostname)-j+1);
@@ -1136,12 +1136,12 @@
 
 
 
-  sock = SOCKET(PF_INET, 
+  sock = SOCKET(PF_INET,
                SOCK_STREAM,
                0);
   if (sock < 0) {
     LOG_STRERROR(LOG_ERROR, "socket");
-    FREE(hostname);   
+    FREE(hostname);
     FREE(reg);
     return;
   }
@@ -1157,21 +1157,21 @@
       FREE(reg);
       FREE(hostname);
       return;
-    }    
-    soaddr.sin_addr.s_addr 
+    }
+    soaddr.sin_addr.s_addr
       = ((struct in_addr*)(ip_info->h_addr))->s_addr;
-    soaddr.sin_port 
+    soaddr.sin_port
       = htons((unsigned short)port);
   } else {
     /* proxy */
-    soaddr.sin_addr.s_addr 
+    soaddr.sin_addr.s_addr
       = theProxy.sin_addr.s_addr;
-    soaddr.sin_port 
+    soaddr.sin_port
       = theProxy.sin_port;
   }
   soaddr.sin_family = AF_INET;
-  if (CONNECT(sock, 
-             (struct sockaddr*)&soaddr, 
+  if (CONNECT(sock,
+             (struct sockaddr*)&soaddr,
              sizeof(soaddr)) < 0) {
     LOG(LOG_WARNING,
        _("Failed to send HTTP request to host '%s': %s\n"),
@@ -1182,8 +1182,8 @@
     CLOSE(sock);
     return;
   }
-  
 
+
   trusted = getConfigurationString("NETWORK",
                                   "TRUSTED");
   if (trusted == NULL)
@@ -1203,14 +1203,14 @@
                                  "LOGIN");
   if (secure == NULL)
     secure = STRDUP("");
-  n = strlen(GET_COMMAND) 
-    + strlen(cmd) 
-    + strlen(reg) 
-    + strlen(trusted) 
+  n = strlen(GET_COMMAND)
+    + strlen(cmd)
+    + strlen(reg)
+    + strlen(trusted)
     + strlen(sport)
     + strlen(secure) + 1;
   command = MALLOC(n);
-  SNPRINTF(command, 
+  SNPRINTF(command,
           n,
           GET_COMMAND,
           reg,
@@ -1231,7 +1231,7 @@
        command,
        hostname,
        STRERROR(errno));
-    FREE(command);    
+    FREE(command);
     FREE(hostname);
     CLOSE(sock);
     return;
@@ -1245,7 +1245,7 @@
   curpos = 0;
   while (curpos < 4) {
     int success;
-    
+
     if (start + 5 * cronMINUTES < cronTime(NULL))
       break; /* exit after 5m */
     success = RECV_NONBLOCKING(sock,
@@ -1254,18 +1254,18 @@
                               &ret);
     if ( success == NO ) {
       gnunet_util_sleep(100 * cronMILLIS);
-      continue;    
+      continue;
     }
     if (ret <= 0)
       break; /* end of transmission or error */
-    if ((c=='\r') || (c=='\n')) 
+    if ((c=='\r') || (c=='\n'))
       curpos += ret;
-    else 
-      curpos=0;    
+    else
+      curpos=0;
   }
-  CLOSE(sock);  
+  CLOSE(sock);
   if (curpos < 4) { /* invalid response */
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("Exit register (error: no http response read).\n"));
   }
 #if DEBUG_HELOEXCHANGE
@@ -1273,7 +1273,7 @@
       "Exit register (%d seconds before timeout)\n",
       (int)(start + 300 * cronSECONDS - cronTime(NULL))/cronSECONDS);
 #endif
-} 
+}
 
 /**
  * When a client exits, kill all associated processes.
@@ -1296,7 +1296,7 @@
   MUTEX_UNLOCK(&lock);
   /* join on all pthreads, but since they may be
      blocking on the same lock, unlock from time
-     to time for a while to let them leave... 
+     to time for a while to let them leave...
      FIXME: not really elegant, better use
      semaphores... */
   while (pding > 0) {
@@ -1332,7 +1332,7 @@
  */
 int initialize_module_testbed(CoreAPIForApplication * capi) {
   unsigned int i;
-  
+
   /* some checks */
   for (i=0;i<TESTBED_MAX_MSG;i++)
     if ( (handlers[i].msgId != i) &&
@@ -1368,16 +1368,16 @@
 
     pi = pt[i];
     if (pi->hasExited != NO)
-      kill(pi->pid, SIGKILL);    
+      kill(pi->pid, SIGKILL);
     PTHREAD_JOIN(&pi->reader,
                 &unused);
     FREENONNULL(pi->output);
-    FREE(pi);    
+    FREE(pi);
   }
   GROW(pt,
        ptSize,
        0);
-  
+
   httpRegister("shutdown");
   MUTEX_DESTROY(&lock);
   LOG(LOG_DEBUG,

Modified: GNUnet/src/applications/testbed/testbed.h
===================================================================
--- GNUnet/src/applications/testbed/testbed.h   2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/testbed/testbed.h   2005-03-20 23:54:53 UTC (rev 
464)
@@ -72,12 +72,12 @@
  */
 
 typedef struct {
-  CS_HEADER header;  
+  CS_HEADER header;
   unsigned int msgType;        /* The message types listed above       */
 } TESTBED_CS_MESSAGE;
 
 typedef struct {
-  TESTBED_CS_MESSAGE testbed_cs_message;  
+  TESTBED_CS_MESSAGE testbed_cs_message;
   char data[1];                /* Value is dependent on the type field */
 } TESTBED_CS_MESSAGE_GENERIC;
 

Modified: GNUnet/src/applications/topology_default/topology.c
===================================================================
--- GNUnet/src/applications/topology_default/topology.c 2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/topology_default/topology.c 2005-03-20 23:54:53 UTC 
(rev 464)
@@ -28,7 +28,7 @@
  * application to allow users to force loading it
  * (which is probably a very good idea -- otherwise
  * the peer will end up rather disconnected :-)
- * 
+ *
  * Todo:
  * - spread out the current 'every-5-second' bulk cron job
  *   over a more continuous interval (as it was in 0.6.5)
@@ -88,12 +88,12 @@
                            const unsigned short proto, 
                            int confirmed,
                            IndexMatch * im) {
-  if (hostIdentityEquals(coreAPI->myIdentity, id)) 
+  if (hostIdentityEquals(coreAPI->myIdentity, id))
     return;
   if (coreAPI->computeIndex(id) != im->index)
     return;
   if (YES == transport->isAvailable(proto)) {
-    im->matchCount++;  
+    im->matchCount++;
     im->costSelector += transport->getCost(proto);
   }
 }
@@ -101,7 +101,7 @@
 /**
  * Select the peer and transport that was selected based on transport
  * cost.
- * 
+ *
  * @param id the current peer
  * @param proto the protocol of the current peer
  * @param im structure responsible for the selection process
@@ -110,15 +110,15 @@
                             const unsigned short proto,
                             int confirmed,
                             IndexMatch * im) {
-  if (hostIdentityEquals(coreAPI->myIdentity, id)) 
+  if (hostIdentityEquals(coreAPI->myIdentity, id))
     return;
   if (coreAPI->computeIndex(id) != im->index)
     return;
   if (YES == transport->isAvailable(proto)) {
     im->costSelector -= transport->getCost(proto);
     if ( (im->matchCount == 0) ||
-        (im->costSelector < 0) ) 
-      im->match = *id;    
+        (im->costSelector < 0) )
+      im->match = *id;
     im->matchCount--;
   }
 }
@@ -142,7 +142,7 @@
   identity->forEachHost(now,
                        (HostIterator)&scanHelperCount,
                        &indexMatch);
-  if (indexMatch.matchCount == 0) 
+  if (indexMatch.matchCount == 0)
     return; /* no matching peers found! */
   if (indexMatch.costSelector > 0)
     indexMatch.costSelector
@@ -151,7 +151,7 @@
   identity->forEachHost(now,
                        (HostIterator)&scanHelperSelect,
                        &indexMatch);
-  if (hostIdentityEquals(coreAPI->myIdentity, 
+  if (hostIdentityEquals(coreAPI->myIdentity,
                         &indexMatch.match)) {
     BREAK(); /* should not happen, at least not often... */
     return;
@@ -175,8 +175,8 @@
 }
 
 /**
- * We received a sign of life from this host. 
- * 
+ * We received a sign of life from this host.
+ *
  * @param hostId the peer that gave a sign of live
  */
 static void notifyPONG(PeerIdentity * hostId) {
@@ -197,12 +197,12 @@
   if (slot == *lastSlot)
     return; /* slot already in use twice! */
   *lastSlot = slot;
-  cronTime(&now);    
+  cronTime(&now);
   if (SYSERR == coreAPI->getLastActivityOf(peer, &act)) {
     BREAK();
     return; /* this should not happen... */
   }
-  
+
   if (now - act > SECONDS_PINGATTEMPT * cronSECONDS) {
     /* if we have less than 75% of the number of connections
        that we would like to have, try ping-ing the other side
@@ -222,7 +222,7 @@
  *
  * @param unused not used, just to make signature type nicely
  */
-static void cronCheckLiveness(void * unused) {  
+static void cronCheckLiveness(void * unused) {
   int i;
   int slotCount;
   int active;
@@ -260,7 +260,7 @@
 
 #define TOPOLOGY_TAG_FILE "topology-070"
 
-Topology_ServiceAPI * 
+Topology_ServiceAPI *
 provide_module_topology_default(CoreAPIForApplication * capi) {
   static Topology_ServiceAPI api;
   char * data;
@@ -298,7 +298,7 @@
                                    (void**) &data))) {
     stateWriteContent(TOPOLOGY_TAG_FILE,
                      strlen(PACKAGE_VERSION),
-                     PACKAGE_VERSION);    
+                     PACKAGE_VERSION);
   } else {
     if (0 != strncmp(PACKAGE_VERSION,
                     data,

Modified: GNUnet/src/applications/topology_f2f/topology.c
===================================================================
--- GNUnet/src/applications/topology_f2f/topology.c     2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/topology_f2f/topology.c     2005-03-20 23:54:53 UTC 
(rev 464)
@@ -28,7 +28,7 @@
  * application to allow users to force loading it
  * (which is probably a very good idea -- otherwise
  * the peer will end up rather disconnected :-)
- * 
+ *
  * Todo:
  * - spread out the current 'every-5-second' bulk cron job
  *   over a more continuous interval (as it was in 0.6.5)
@@ -86,7 +86,7 @@
   int i;
 
   for (i=friendCount-1;i>=0;i--)
-    if (hostIdentityEquals(&friends[i], peer)) 
+    if (hostIdentityEquals(&friends[i], peer))
       return OK;
   return SYSERR;
 }
@@ -104,13 +104,13 @@
                            const unsigned short proto, 
                            int confirmed,
                            IndexMatch * im) {
-  if (hostIdentityEquals(coreAPI->myIdentity, id)) 
+  if (hostIdentityEquals(coreAPI->myIdentity, id))
     return;
   if (coreAPI->computeIndex(id) != im->index)
     return;
   if ( (YES == transport->isAvailable(proto)) &&
        (OK == allowConnection(id)) ) {
-    im->matchCount++;  
+    im->matchCount++;
     im->costSelector += transport->getCost(proto);
   }
 }
@@ -118,7 +118,7 @@
 /**
  * Select the peer and transport that was selected based on transport
  * cost.
- * 
+ *
  * @param id the current peer
  * @param proto the protocol of the current peer
  * @param im structure responsible for the selection process
@@ -127,7 +127,7 @@
                             const unsigned short proto,
                             int confirmed,
                             IndexMatch * im) {
-  if (hostIdentityEquals(coreAPI->myIdentity, id)) 
+  if (hostIdentityEquals(coreAPI->myIdentity, id))
     return;
   if (coreAPI->computeIndex(id) != im->index)
     return;
@@ -135,8 +135,8 @@
        (YES == transport->isAvailable(proto)) ) {
     im->costSelector -= transport->getCost(proto);
     if ( (im->matchCount == 0) ||
-        (im->costSelector < 0) ) 
-      im->match = *id;    
+        (im->costSelector < 0) )
+      im->match = *id;
     im->matchCount--;
   }
 }
@@ -160,7 +160,7 @@
   identity->forEachHost(now,
                        (HostIterator)&scanHelperCount,
                        &indexMatch);
-  if (indexMatch.matchCount == 0) 
+  if (indexMatch.matchCount == 0)
     return; /* no matching peers found! */
   if (indexMatch.costSelector > 0)
     indexMatch.costSelector
@@ -169,7 +169,7 @@
   identity->forEachHost(now,
                        (HostIterator)&scanHelperSelect,
                        &indexMatch);
-  if (hostIdentityEquals(coreAPI->myIdentity, 
+  if (hostIdentityEquals(coreAPI->myIdentity,
                         &indexMatch.match)) {
     BREAK(); /* should not happen, at least not often... */
     return;
@@ -190,8 +190,8 @@
 }
 
 /**
- * We received a sign of life from this host. 
- * 
+ * We received a sign of life from this host.
+ *
  * @param hostId the peer that gave a sign of live
  */
 static void notifyPONG(PeerIdentity * hostId) {
@@ -212,12 +212,12 @@
   if (slot == *lastSlot)
     return; /* slot already in use twice! */
   *lastSlot = slot;
-  cronTime(&now);    
+  cronTime(&now);
   if (SYSERR == coreAPI->getLastActivityOf(peer, &act)) {
     BREAK();
     return; /* this should not happen... */
   }
-  
+
   if (now - act > SECONDS_PINGATTEMPT * cronSECONDS) {
     /* if we have less than 75% of the number of connections
        that we would like to have, try ping-ing the other side
@@ -237,15 +237,15 @@
  *
  * @param unused not used, just to make signature type nicely
  */
-static void cronCheckLiveness(void * unused) {  
+static void cronCheckLiveness(void * unused) {
   int i;
   int slotCount;
   int active;
 
   slotCount = coreAPI->getSlotCount();
-  for (i=slotCount-1;i>=0;i--) 
+  for (i=slotCount-1;i>=0;i--)
     if (0 == coreAPI->isSlotUsed(i))
-      scanForHosts(i);  
+      scanForHosts(i);
   if (saturation >= 0.75) {
     i = -1;
     active = coreAPI->forAllConnectedNodes((PerNodeCallback)&checkNeedForPing,
@@ -265,7 +265,7 @@
   return saturation;
 }
 
-Topology_ServiceAPI * 
+Topology_ServiceAPI *
 provide_module_topology_f2f(CoreAPIForApplication * capi) {
   static Topology_ServiceAPI api;
 

Modified: GNUnet/src/applications/tracekit/gnunet-tracekit.c
===================================================================
--- GNUnet/src/applications/tracekit/gnunet-tracekit.c  2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/tracekit/gnunet-tracekit.c  2005-03-20 23:54:53 UTC 
(rev 464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file applications/tracekit/gnunet-tracekit.c 
+ * @file applications/tracekit/gnunet-tracekit.c
  * @brief tool that sends a trace request and prints the received network 
topology
  * @author Christian Grothoff
  */
@@ -36,12 +36,12 @@
  * Parse the options, set the timeout.
  * @param argc the number of options
  * @param argv the option list (including keywords)
- * @return OK on error, SYSERR if we should exit 
+ * @return OK on error, SYSERR if we should exit
  */
 static int parseOptions(int argc,
                        char ** argv) {
   int option_index;
-  int c;  
+  int c;
 
   FREENONNULL(setConfigurationString("GNUNETD",
                                     "LOGFILE",
@@ -54,14 +54,14 @@
       { "priority", 1, 0, 'P' },
       { "wait", 1, 0, 'W' },
       { 0,0,0,0 }
-    };    
+    };
     option_index = 0;
     c = GNgetopt_long(argc,
-                     argv, 
-                     "vhdc:L:H:W:D:F:P:", 
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     argv,
+                     "vhdc:L:H:W:D:F:P:",
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
@@ -69,7 +69,7 @@
     case 'D': {
       unsigned int depth;
       if (1 != sscanf(GNoptarg, "%ud", &depth)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-D");
        return SYSERR;
@@ -83,7 +83,7 @@
     case 'F': {
       unsigned int format;
       if (1 != sscanf(GNoptarg, "%ud", &format)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-F");
        return SYSERR;
@@ -118,7 +118,7 @@
     case 'P': {
       unsigned int prio;
       if (1 != sscanf(GNoptarg, "%ud", &prio)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-P");
        return SYSERR;
@@ -132,7 +132,7 @@
     case 'W': {
       unsigned int wait;
       if (1 != sscanf(GNoptarg, "%ud", &wait)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-W");
        return SYSERR;
@@ -143,12 +143,12 @@
       }
       break;
     }
-    case 'v': 
+    case 'v':
       printf("GNUnet v%s, gnunet-tracekit v%s\n",
             VERSION,
             TRACEKIT_VERSION);
       return SYSERR;
-    default: 
+    default:
       LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
       return SYSERR;
@@ -177,13 +177,13 @@
   prSize = 1;
   peersResponding = MALLOC(prSize * sizeof(PeerIdentity));
   buffer = MALLOC(MAX_BUFFER_SIZE);
-  format = getConfigurationInt("GNUNET-TRACEKIT", 
+  format = getConfigurationInt("GNUNET-TRACEKIT",
                               "FORMAT");
   if (format == 1)
     printf("digraph G {\n");
   if (format == 2)
     printf("graph: {\n");
-  while (OK == readFromSocket(sock, 
+  while (OK == readFromSocket(sock,
                              (CS_HEADER**)&buffer)) {
     int count;
     EncName enc;
@@ -201,7 +201,7 @@
                            &peersResponding[j].hashPubKey))
        match = YES;
     if (match == NO) {
-      if (prCount == prSize) 
+      if (prCount == prSize)
        GROW(peersResponding,
             prSize,
             prSize*2);
@@ -339,7 +339,7 @@
     printf("}\n");
   SEMAPHORE_UP(doneSem);
   FREE(peersResponding);
-  FREE(peersSeen);  
+  FREE(peersSeen);
   return NULL;
 }
 
@@ -347,7 +347,7 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return return value from gnunet-tracekit: 0: ok, -1: error
- */   
+ */
 int main(int argc, char ** argv) {
   GNUNET_TCP_SOCKET * sock;
   PTHREAD_T messageReceiveThread;
@@ -356,7 +356,7 @@
   int sleepTime;
 
   if (SYSERR == initUtil(argc, argv, &parseOptions))
-    return 0; /* parse error, --help, etc. */ 
+    return 0; /* parse error, --help, etc. */
   sock = getClientSocket();
   if (sock == NULL) {
     LOG(LOG_ERROR,
@@ -365,22 +365,22 @@
   }
 
   doneSem = SEMAPHORE_NEW(0);
-  if (0 != PTHREAD_CREATE(&messageReceiveThread, 
-                         (PThreadMain) &receiveThread, 
+  if (0 != PTHREAD_CREATE(&messageReceiveThread,
+                         (PThreadMain) &receiveThread,
                          sock,
                          128 * 1024))
     DIE_STRERROR("pthread_create");
-  
-  probe.header.size 
+
+  probe.header.size
     = htons(sizeof(TRACEKIT_CS_PROBE));
   probe.header.type
     = htons(TRACEKIT_CS_PROTO_PROBE);
-  probe.hops 
+  probe.hops
     = htonl(getConfigurationInt("GNUNET-TRACEKIT",
                                "HOPS"));
   probe.priority
     = htonl(getConfigurationInt("GNUNET-TRACEKIT",
-                               "PRIORITY"));  
+                               "PRIORITY"));
   if (SYSERR == writeToSocket(sock,
                               &probe.header)) {
     LOG(LOG_ERROR,

Modified: GNUnet/src/applications/tracekit/tracekit.c
===================================================================
--- GNUnet/src/applications/tracekit/tracekit.c 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/tracekit/tracekit.c 2005-03-20 23:54:53 UTC (rev 
464)
@@ -44,7 +44,7 @@
 typedef struct {
   PeerIdentity initiator;
   PeerIdentity replyTo;
-  TIME_T timestamp;  
+  TIME_T timestamp;
   unsigned int priority;
 } RTE;
 
@@ -110,11 +110,11 @@
        
        csReply = 
MALLOC(sizeof(TRACEKIT_CS_REPLY)+hostCount*sizeof(PeerIdentity));
        /* build msg */
-       csReply->header.size 
+       csReply->header.size
          = htons(sizeof(TRACEKIT_CS_REPLY)+hostCount*sizeof(PeerIdentity));
-       csReply->header.type 
+       csReply->header.type
          = htons(TRACEKIT_CS_PROTO_REPLY);
-       csReply->responderId 
+       csReply->responderId
          = reply->responderId;
        memcpy(&((TRACEKIT_CS_REPLY_GENERIC*)csReply)->peerList[0],
               &((TRACEKIT_p2p_REPLY_GENERIC*)reply)->peerList[0],
@@ -189,7 +189,7 @@
 
   hash2enc(&sender->hashPubKey,
           &sen);
-  if (ntohs(message->size) != 
+  if (ntohs(message->size) !=
       sizeof(TRACEKIT_p2p_PROBE)) {
     LOG(LOG_WARNING,
        _("Received invalid '%s' message from '%s'.\n"),
@@ -207,7 +207,7 @@
   if ((TIME_T)ntohl(msg->timestamp) > 3600 + now) {
     LOG(LOG_DEBUG,
        "TRACEKIT: probe has timestamp in the far future (%d > %d), dropping\n",
-       ntohl(msg->timestamp), 
+       ntohl(msg->timestamp),
        3600 + now);
     return SYSERR; /* Timestamp is more than 1h in the future. Invalid! */
   }
@@ -257,14 +257,14 @@
   }
   if (routeTable[sel] == NULL)
     routeTable[sel] = MALLOC(sizeof(RTE));
-  routeTable[sel]->timestamp 
+  routeTable[sel]->timestamp
     = ntohl(msg->timestamp);
   routeTable[sel]->priority
     = ntohl(msg->priority);
-  routeTable[sel]->initiator 
+  routeTable[sel]->initiator
     = msg->initiatorId;
   routeTable[sel]->replyTo
-    = *sender;  
+    = *sender;
   MUTEX_UNLOCK(&lock);
   LOG(LOG_DEBUG,
       "TRACEKIT-PROBE started at %d by peer '%s' received, processing in slot 
%d with %u hops\n",
@@ -280,7 +280,7 @@
     coreAPI->forAllConnectedNodes((PerNodeCallback) & transmit,
                                  msg);
 #if VERBOSE_STATS
-    statChange(stat_p2p_requests, 
+    statChange(stat_p2p_requests,
               count);
 #endif
   }
@@ -292,13 +292,13 @@
   closure.pos = 0;
   coreAPI->forAllConnectedNodes((PerNodeCallback)&getPeerCallback,
                                &closure);
-  reply->header.type 
+  reply->header.type
     = htons(TRACEKIT_p2p_PROTO_REPLY);
-  reply->initiatorId 
+  reply->initiatorId
     = msg->initiatorId;
   reply->responderId
     = *(coreAPI->myIdentity);
-  reply->initiatorTimestamp 
+  reply->initiatorTimestamp
     = msg->timestamp;
   reply->clientId
     = msg->clientId;
@@ -308,11 +308,11 @@
     int maxBytes;
     int batchSize;
 
-    if (size > 1024) {     
+    if (size > 1024) {
       batchSize = (1024 - sizeof(TRACEKIT_p2p_REPLY) / sizeof(PeerIdentity));
       maxBytes = sizeof(TRACEKIT_p2p_REPLY) + sizeof(PeerIdentity) * batchSize;
     } else {
-      batchSize = (size - sizeof(TRACEKIT_p2p_REPLY)) / sizeof(PeerIdentity); 
+      batchSize = (size - sizeof(TRACEKIT_p2p_REPLY)) / sizeof(PeerIdentity);
       maxBytes = size;
     }
     reply->header.size
@@ -357,7 +357,7 @@
 
   /* build probe, broadcast */
   csProbe = (TRACEKIT_CS_PROBE*) message;
-  if (ntohs(csProbe->header.size) != 
+  if (ntohs(csProbe->header.size) !=
       sizeof(TRACEKIT_CS_PROBE) ) {
     LOG(LOG_WARNING,
        _("TRACEKIT: received invalid '%s' message\n"),
@@ -371,7 +371,7 @@
     if (clients[i] == client) {
       idx = i;
       break;
-    }    
+    }
     if ( (clients[i] == NULL) &&
         (idx == -1) ) {
       idx = i;
@@ -383,7 +383,7 @@
         clientCount,
         clientCount+1);
     idx = clientCount-1;
-  }  
+  }
   clients[idx] = client;
   MUTEX_UNLOCK(&lock);
   LOG(LOG_DEBUG,
@@ -432,7 +432,7 @@
     i--;
   i++;
   if (i != clientCount)
-    GROW(clients, 
+    GROW(clients,
         clientCount,
         i);
   MUTEX_UNLOCK(&lock);
@@ -444,7 +444,7 @@
   MUTEX_CREATE(&lock);
   coreAPI = capi;
 #if VERBOSE_STATS
-  stat_cs_requests 
+  stat_cs_requests
     = statHandle(_("# client trace requests received"));
   stat_cs_replies
     = statHandle(_("# client trace replies sent"));
@@ -458,8 +458,8 @@
       TRACEKIT_p2p_PROTO_PROBE,
       TRACEKIT_p2p_PROTO_REPLY,
       TRACEKIT_CS_PROTO_PROBE);
-  memset(routeTable, 
-        0, 
+  memset(routeTable,
+        0,
         MAXROUTE*sizeof(RTE*));
   if (SYSERR == capi->registerHandler(TRACEKIT_p2p_PROTO_PROBE,
                                      &handlep2pProbe))
@@ -488,7 +488,7 @@
   for (i=0;i<MAXROUTE;i++) {
     FREENONNULL(routeTable[i]);
     routeTable[i] = NULL;
-  }  
+  }
   GROW(clients,
        clientCount,
        0);

Modified: GNUnet/src/applications/tracekit/tracekit.h
===================================================================
--- GNUnet/src/applications/tracekit/tracekit.h 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/tracekit/tracekit.h 2005-03-20 23:54:53 UTC (rev 
464)
@@ -35,7 +35,7 @@
    * When was this probe started? (NBO)
    */
   TIME_T timestamp;
-  
+
   /**
    * How many more hops should this probe go (NBO)
    */
@@ -73,7 +73,7 @@
    * for sending this reply?
    */
   PeerIdentity responderId;
-  
+
   /**
    * At what time was the initator sending the
    * request?
@@ -96,8 +96,8 @@
    */
   PeerIdentity peerList[1];
 } TRACEKIT_p2p_REPLY_GENERIC;
-  
 
+
 typedef struct {
   CS_HEADER header;
 
@@ -120,7 +120,7 @@
    * for sending this reply?
    */
   PeerIdentity responderId;
-  
+
 } TRACEKIT_CS_REPLY;
 
 typedef struct {

Modified: GNUnet/src/applications/traffic/clientapi.c
===================================================================
--- GNUnet/src/applications/traffic/clientapi.c 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/traffic/clientapi.c 2005-03-20 23:54:53 UTC (rev 
464)
@@ -18,11 +18,11 @@
      Boston, MA 02111-1307, USA.
 */
 
-/** 
+/**
  * @file traffic/clientapi.c
  * @author Christian Grothoff
  * @brief API for clients to obtain traffic statistics
- */ 
+ */
 
 #include "platform.h"
 #include "gnunet_protocols.h"
@@ -55,28 +55,28 @@
   CS_TRAFFIC_REQUEST req;
   int i;
 
-  req.header.size 
+  req.header.size
     = htons(sizeof(CS_TRAFFIC_REQUEST));
   req.header.type
     = htons(CS_PROTO_TRAFFIC_QUERY);
-  req.timePeriod 
+  req.timePeriod
     = htonl(timeframe);
   if (SYSERR == writeToSocket(sock,
                              &req.header)) {
     LOG(LOG_WARNING,
        _("Failed to query gnunetd about traffic conditions.\n"));
-    return SYSERR; 
+    return SYSERR;
   }
   info = NULL;
   if (SYSERR == readFromSocket(sock,
                               (CS_HEADER**)&info)) {
     LOG(LOG_WARNING,
        _("Did not receive reply from gnunetd about traffic conditions.\n"));
-    return SYSERR; 
+    return SYSERR;
   }
-  if ( (ntohs(info->header.type) != 
+  if ( (ntohs(info->header.type) !=
        CS_PROTO_TRAFFIC_INFO) ||
-       (ntohs(info->header.size) != 
+       (ntohs(info->header.size) !=
        sizeof(CS_TRAFFIC_INFO) + ntohl(info->count)*sizeof(TRAFFIC_COUNTER)) ) 
{
     BREAK();
     return SYSERR;

Modified: GNUnet/src/applications/traffic/traffic.c
===================================================================
--- GNUnet/src/applications/traffic/traffic.c   2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/traffic/traffic.c   2005-03-20 23:54:53 UTC (rev 
464)
@@ -21,7 +21,7 @@
  * @file applications/traffic/traffic.c
  * @brief tracks current traffic patterns
  * @author Christian Grothoff
- * 
+ *
  * Module to keep track of recent amounts of p2p traffic on the local
  * GNUnet node. Uses roughly 6 kb of memory given the current
  * settings. The current settings allow the minimal anonymity
@@ -84,10 +84,10 @@
  * in a message of the given type.
  */
 typedef struct {
-  
+
   /**
    * The ".a" member of the Host identity of the peer.
-   */ 
+   */
   int peerIdentity_a;
 
   /**
@@ -101,7 +101,7 @@
  * Numbers for one receive/send/self-send type.
  */
 typedef struct {
-  
+
   /**
    * When was this record last updated?
    */
@@ -120,7 +120,7 @@
 
   /**
    * How many messages were processed? (rotating buffer)
-   */ 
+   */
   unsigned int count[HISTORY_SIZE];
 
   /**
@@ -134,15 +134,15 @@
  * Type of the internal traffic counters.
  */
 typedef struct {
-  
+
   /**
-   * Statistics for sending 
-   */ 
+   * Statistics for sending
+   */
   DirectedTrafficCounter send;
 
   /**
    * Statistics for receiving
-   */ 
+   */
   DirectedTrafficCounter receive;
 
 } TrafficCounter;
@@ -213,13 +213,13 @@
     dtc->count[HS_SLOT(unitNow - HISTORY_SIZE - i)] = 0;
     dtc->avgSize[HS_SLOT(unitNow - HISTORY_SIZE - i)] = 0.0;
   }
-  
+
   if (NO == expireOnly) {
     int devideBy;
-    
+
     /* update slots */
     dtc->slots = 0x80000000 | (dtc->slots >> deltaUnits);
-    
+
     /* recompute average, increment count */
     slot = HS_SLOT(unitNow);
     dtc->count[slot]++;
@@ -227,8 +227,8 @@
     if (devideBy <= 0)
       dtc->avgSize[slot] = 0; /* how can this happen? */
     else
-      dtc->avgSize[slot] 
-        = ((dtc->avgSize[slot] * (dtc->count[slot]-1)) + size) / devideBy; 
+      dtc->avgSize[slot]
+        = ((dtc->avgSize[slot] * (dtc->count[slot]-1)) + size) / devideBy;
   }
 }
 
@@ -286,7 +286,7 @@
 
 /**
  * Build a reply message for the client.
- */ 
+ */
 static CS_TRAFFIC_INFO * buildReply(unsigned int countTimeUnits) {
   CS_TRAFFIC_INFO * reply;
   unsigned int count;
@@ -294,7 +294,7 @@
 
   MUTEX_LOCK(&lock);
   count = 0;
-  for (i=0;i<max_message_type;i++) 
+  for (i=0;i<max_message_type;i++)
     if (counters[i] != NULL) {
       if (counters[i]->send.slots != 0)
        count++;
@@ -308,22 +308,22 @@
                            count * sizeof(TRAFFIC_COUNTER));
   reply->count = htonl(count);
   count = 0;
-  for (i=0;i<max_message_type;i++) 
+  for (i=0;i<max_message_type;i++)
     if (counters[i] != NULL) {
-      if (counters[i]->send.slots != 0) 
+      if (counters[i]->send.slots != 0)
        buildSummary(&((CS_TRAFFIC_INFO_GENERIC*)reply)->counters[count++],
                     &counters[i]->send,
-                    TC_SENT, 
+                    TC_SENT,
                     countTimeUnits,
                     i);
       if (counters[i]->receive.slots != 0)
        buildSummary(&((CS_TRAFFIC_INFO_GENERIC*)reply)->counters[count++],
                     &counters[i]->receive,
-                    TC_RECEIVED, 
+                    TC_RECEIVED,
                     countTimeUnits,
                     i);
     }
-  
+
   MUTEX_UNLOCK(&lock);
   return reply;
 }
@@ -392,7 +392,7 @@
   *peerCount = 0;
   *messageCount = 0;
   totSize = 0;
-  for (i=0;i<MAX_PEER_IDs;i++) 
+  for (i=0;i<MAX_PEER_IDs;i++)
     if (dtc->peers[i].time > nowUnit - timePeriod)
       (*peerCount)++;
   for (i=0;i<timePeriod;i++) {
@@ -418,7 +418,7 @@
  * given port.
  */
 static void checkPort(unsigned short port) {
-  if (port >= max_message_type) 
+  if (port >= max_message_type)
     GROW(counters,
         max_message_type,
         port + 1);
@@ -433,12 +433,12 @@
 static void updateTrafficSendCounter(unsigned short ptyp,
                                     unsigned short plen) {
 #if KEEP_TRANSMITTED_STATS
-  if (ptyp >= MAX_p2p_PROTO_USED) 
+  if (ptyp >= MAX_p2p_PROTO_USED)
     return; /* not tracked */
   if (0 == stat_traffic_transmitted_by_type[ptyp]) {
     char * s;
     s = MALLOC(256);
-    SNPRINTF(s, 
+    SNPRINTF(s,
             256,
             _("# bytes transmitted of type %d"),
             ptyp);
@@ -458,7 +458,7 @@
     if (0 == stat_traffic_received_by_type[ptyp]) {
       char * s;
       s = MALLOC(256);
-      SNPRINTF(s, 
+      SNPRINTF(s,
               256,
               _("# bytes received of type %d"),
               ptyp);
@@ -477,7 +477,7 @@
  * A message was received.  Update traffic stats.
  *
  * @param header the header of the message
- * @param sender the identity of the sender 
+ * @param sender the identity of the sender
  */
 static int trafficReceive(const PeerIdentity * sender,
                          const p2p_HEADER * header) {
@@ -498,7 +498,7 @@
 
 /**
  * A message is send.  Update traffic stats.
- * 
+ *
  * @param header the header of the message
  * @param receiver the identity of the receiver
  */
@@ -528,12 +528,12 @@
 #if KEEP_RECEIVE_STATS || KEEP_TRANSMITTED_STATS
   int i;
 #endif
-  
+
   coreAPI = capi;
   api.get = &getTrafficStats;
 #if KEEP_TRANSMITTED_STATS
-  for (i=0;i<MAX_p2p_PROTO_USED;i++) 
-    stat_traffic_transmitted_by_type[i] = 0;  
+  for (i=0;i<MAX_p2p_PROTO_USED;i++)
+    stat_traffic_transmitted_by_type[i] = 0;
   coreAPI->unregisterSendNotify(&trafficSend);
 #endif
 #if KEEP_RECEIVE_STATS
@@ -557,14 +557,14 @@
  */
 void release_module_traffic() {
   unsigned int i;
-  
+
 #if KEEP_RECEIVE_STATS
-  for (i=0;i<MAX_p2p_PROTO_USED;i++) 
+  for (i=0;i<MAX_p2p_PROTO_USED;i++)
     coreAPI->unregisterHandler(i,
-                            &trafficReceive);  
+                            &trafficReceive);
 #endif
 #if KEEP_TRANSMITTED_STATS
-  coreAPI->unregisterSendNotify(&trafficSend);  
+  coreAPI->unregisterSendNotify(&trafficSend);
 #endif
 #if KEEP_RECEIVE_STATS || KEEP_TRANSMITTED_STATS
   coreAPI->releaseService(stats);
@@ -591,7 +591,7 @@
   GNUNET_ASSERT(myCoreAPI == NULL);
   myCoreAPI = capi;
   myApi = capi->requestService("traffic");
-  if (myApi == NULL) { 
+  if (myApi == NULL) {
     BREAK();
     myCoreAPI = NULL;
     return SYSERR;

Modified: GNUnet/src/applications/traffic/traffic.h
===================================================================
--- GNUnet/src/applications/traffic/traffic.h   2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/applications/traffic/traffic.h   2005-03-20 23:54:53 UTC (rev 
464)
@@ -20,7 +20,7 @@
 /**
  * @file traffic/traffic.h
  * @author Christian Grothoff
- * 
+ *
  * @brief Module to keep track of recent amounts of p2p traffic
  * on the local GNUnet node.
  */
@@ -81,7 +81,7 @@
 } CS_TRAFFIC_INFO;
 
 /**
- * Generic version of CS_TRAFFIC_INFO with field for accessing end of struct 
+ * Generic version of CS_TRAFFIC_INFO with field for accessing end of struct
  * (use the other version for allocation).
  */
 typedef struct {
@@ -107,7 +107,7 @@
   CS_HEADER header;
 
   /**
-   * How many time units back should the statistics returned contain? 
+   * How many time units back should the statistics returned contain?
    * (in network byte order) Must be smaller or equal to HISTORY_SIZE.
    */
   unsigned int timePeriod;

Modified: GNUnet/src/applications/transport/transport.c
===================================================================
--- GNUnet/src/applications/transport/transport.c       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/applications/transport/transport.c       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -65,16 +65,16 @@
   memcpy(&tapi->helo->senderIdentity,
         coreAPI->myIdentity,
         sizeof(PeerIdentity));
-  tapi->helo->expirationTime 
+  tapi->helo->expirationTime
     = htonl(TIME(NULL) + helo_live);
-  tapi->helo->header.type 
+  tapi->helo->header.type
     = htons(p2p_PROTO_HELO);
   tapi->helo->header.size
     = htons(HELO_Message_size(tapi->helo));
   if (SYSERR == identity->signData(&(tapi->helo)->senderIdentity,
-                                  HELO_Message_size(tapi->helo) 
-                                  - sizeof(Signature) 
-                                  - sizeof(PublicKey) 
+                                  HELO_Message_size(tapi->helo)
+                                  - sizeof(Signature)
+                                  - sizeof(PublicKey)
                                   - sizeof(p2p_HEADER),
                                   &tapi->helo->signature)) {
     FREE(tapi->helo);
@@ -88,7 +88,7 @@
  * @return YES or NO
  */
 static int isTransportAvailable(unsigned short ttype) {
-  if (ttype >= tapis_count) 
+  if (ttype >= tapis_count)
     return NO;
   if (NULL == tapis[ttype])
     return NO;
@@ -98,8 +98,8 @@
 /**
  * Add an implementation of a transport protocol.
  */
-static int addTransport(TransportAPI * tapi) {  
-  if (tapi->protocolNumber >= tapis_count) 
+static int addTransport(TransportAPI * tapi) {
+  if (tapi->protocolNumber >= tapis_count)
     GROW(tapis,
         tapis_count,
         tapi->protocolNumber+1);
@@ -118,7 +118,7 @@
 static char * heloToString(const HELO_Message * helo) {
   TransportAPI * tapi;
   unsigned short prot;
-  
+
   if (ntohs(helo->protocol) >= tapis_count) {
     LOG(LOG_INFO,
        "%s failed, transport type %d not supported\n",
@@ -134,7 +134,7 @@
        __FUNCTION__,
        ntohs(helo->protocol));
      return NULL;
-  } else 
+  } else
     return tapi->addressToString(helo);
 }
 
@@ -147,7 +147,7 @@
 static void forEachTransport(TransportCallback callback,
                             void * data) {
   int i;
-  
+
   for (i=0;i<tapis_count;i++)
     if (tapis[i] != NULL)
       callback(tapis[i], data);
@@ -165,10 +165,10 @@
  * @return OK on success, SYSERR on error
  */
 static int transportConnect(HELO_Message * helo,
-                           TSession ** tsession) { 
+                           TSession ** tsession) {
   TransportAPI * tapi;
   unsigned short prot;
-  
+
   if (ntohs(helo->protocol) >= tapis_count) {
     LOG(LOG_INFO,
        "%s failed, transport type %d not supported\n",
@@ -187,7 +187,7 @@
   } else {
 
     if (OK == tapi->connect(helo,
-                           tsession)) {      
+                           tsession)) {
       (*tsession)->ttype = prot;
 #if DEBUG_TRANSPORT
       LOG(LOG_DEBUG,
@@ -213,7 +213,7 @@
  */
 static int transportAssociate(TSession * tsession) {
   TransportAPI * tapi;
-  
+
   if (tsession == NULL)
     return SYSERR;
   if (tsession->ttype >= tapis_count)
@@ -237,7 +237,7 @@
  */
 static unsigned int transportGetCost(int ttype) {
   TransportAPI * tapi;
-  
+
   if (ttype >= tapis_count)
     return SYSERR; /* -1 = INFTY */
   tapi = tapis[ttype];
@@ -279,7 +279,7 @@
     return SYSERR;
   } else
     return tapi->send(tsession,
-                     msg, 
+                     msg,
                      size);
 }
 
@@ -316,17 +316,17 @@
   }
   else
     return tapi->sendReliable(tsession,
-                             msg, 
+                             msg,
                              size);
 }
 
 /**
  * Close the session with the remote node.
  * @return OK on success, SYSERR on error
- */ 
+ */
 static int transportDisconnect(TSession * tsession) {
   TransportAPI * tapi;
-  
+
   if (tsession == NULL) {
     BREAK();
     return SYSERR;
@@ -372,8 +372,8 @@
        " does not match any known transport.\n",
        ntohs(helo->protocol));
     return SYSERR;
-  } else 
-    return tapi->verifyHelo(helo);  
+  } else
+    return tapi->verifyHelo(helo);
 }
 
 /**
@@ -381,7 +381,7 @@
  */
 static int transportGetMTU(unsigned short ttype) {
   TransportAPI * tapi;
-  
+
   if (ttype >= tapis_count)
     return SYSERR;
   tapi = tapis[ttype];
@@ -408,7 +408,7 @@
     ttype = tapis_count-1;
     while ( (ttype < tapis_count) &&
            ( (tapis[perm[ttype]] == NULL) ||
-             (tapis[perm[ttype]] != NULL && 
+             (tapis[perm[ttype]] != NULL &&
               tapis[perm[ttype]]->helo == NULL) ) )
       ttype--;
     if (ttype >= tapis_count) {
@@ -417,10 +417,10 @@
       return SYSERR;
     }
     ttype = perm[ttype];
-    FREE(perm);    
+    FREE(perm);
   }
   if (ttype >= tapis_count) {
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("No transport of type %d known.\n"),
        ttype);
     MUTEX_UNLOCK(&tapis_lock);
@@ -428,15 +428,15 @@
   }
   tapi = tapis[ttype];
   if (tapi == NULL) {
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("No transport of type %d known.\n"),
        ttype);
     MUTEX_UNLOCK(&tapis_lock);
     return SYSERR;
-  } 
+  }
   if (tapi->helo == NULL) {
 #if DEBUG_TRANSPORT
-    LOG(LOG_DEBUG, 
+    LOG(LOG_DEBUG,
        "Transport of type %d configured for sending only.\n",
        ttype);
 #endif
@@ -472,12 +472,12 @@
   int tcount;
   HELO_Message ** helos;
   int used;
-  
+
   tcount = 0;
   for (i=0;i<tapis_count;i++)
     if (tapis[i] != NULL)
       tcount++;
-  
+
   helos = MALLOC(tcount * sizeof(HELO_Message*));
   tcount = 0;
   for (i=0;i<tapis_count;i++)
@@ -500,7 +500,7 @@
           HELO_Message_size(helos[i]));
     used += HELO_Message_size(helos[i]);
     FREE(helos[i]);
-    helos[i] = NULL; 
+    helos[i] = NULL;
     j = 0; /* try until 10 attempts fail, restart after every success! */
   }
 
@@ -509,7 +509,7 @@
       FREE(helos[i]);
   FREE(helos);
   return used;
-}    
+}
 
 
 
@@ -529,7 +529,7 @@
 /**
  * Stop the transport services, stop receiving messages.
  */
-static void stopTransports() {  
+static void stopTransports() {
   int i;
   for (i=0;i<tapis_count;i++)
     if (tapis[i] != NULL)
@@ -577,13 +577,13 @@
   ctapi.myIdentity = coreAPI->myIdentity;
   ctapi.receive = NULL; /* initialized LATER! */
   ctapi.requestService = coreAPI->requestService;
-  ctapi.releaseService = coreAPI->releaseService;  
+  ctapi.releaseService = coreAPI->releaseService;
 
   helo_live = getConfigurationInt("GNUNETD",
                                  "HELOEXPIRES") * 60; /* minutes to seconds */
-  if (helo_live > MAX_HELO_EXPIRES) 
+  if (helo_live > MAX_HELO_EXPIRES)
     helo_live = MAX_HELO_EXPIRES;
-  
+
   if (helo_live <= 0) {
     helo_live = 60 * 60;
     LOG(LOG_WARNING,
@@ -593,7 +593,7 @@
   GROW(tapis,
        tapis_count,
        UDP_PROTOCOL_NUMBER+1);
-  
+
   MUTEX_CREATE(&tapis_lock);
 
   /* now load transports */
@@ -624,8 +624,8 @@
                               pos);
       tptr = bindDynamicMethod(lib,
                               "inittransport_",
-                              pos);  
-      if (tptr == NULL) 
+                              pos);
+      if (tptr == NULL)
        errexit(_("Transport library '%s' did not provide required function 
'%s%s'.\n"),
                pos,
                "inittransport_",
@@ -633,7 +633,7 @@
       tapi = tptr(&ctapi);
       tapi->libHandle = lib;
       tapi->transName = STRDUP(pos);
-      addTransport(tapi); 
+      addTransport(tapi);
       LOG(LOG_DEBUG,
          "Loaded transport '%s'\n",
          pos);

Modified: GNUnet/src/conf/confdata.c
===================================================================
--- GNUnet/src/conf/confdata.c  2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/confdata.c  2005-03-20 23:54:53 UTC (rev 464)
@@ -322,9 +322,9 @@
        if (! dirname[0])
                strcpy(dirname, conf_def_dir);
 
-       sprintf(newname, 
-               "%s.tmpconfig.%u", 
-               dirname, 
+       sprintf(newname,
+               "%s.tmpconfig.%u",
+               dirname,
                (unsigned int) getpid());
        out = FOPEN(newname, "w");
        if (!out)

Modified: GNUnet/src/conf/expr.c
===================================================================
--- GNUnet/src/conf/expr.c      2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/expr.c      2005-03-20 23:54:53 UTC (rev 464)
@@ -5,7 +5,7 @@
 
 /**
  * @brief GNUnet Setup
- * @file conf/expr.c 
+ * @file conf/expr.c
  * @author Roman Zippel
  * @author Nils Durner
  */

Modified: GNUnet/src/conf/expr.h
===================================================================
--- GNUnet/src/conf/expr.h      2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/expr.h      2005-03-20 23:54:53 UTC (rev 464)
@@ -5,7 +5,7 @@
 
 /**
  * @brief GNUnet Setup
- * @file conf/expr.h 
+ * @file conf/expr.h
  * @author Roman Zippel
  * @author Nils Durner
  **/
@@ -143,7 +143,7 @@
        //char *help;
        struct file *file;
        int lineno;
-       void *data; 
+       void *data;
        char *section;
 };
 

Modified: GNUnet/src/conf/gconf.c
===================================================================
--- GNUnet/src/conf/gconf.c     2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/gconf.c     2005-03-20 23:54:53 UTC (rev 464)
@@ -25,7 +25,7 @@
 
 /**
  * @brief GNUnet Setup
- * @file conf/gconf.c 
+ * @file conf/gconf.c
  * @author Roman Zippel
  * @author Nils Durner
  */
@@ -237,7 +237,7 @@
   GtkToolbar *toolbar;
   GtkWidget *vbox;
   GtkMenu *options;
-  
+
   main_wnd = create_main_wnd ();
   gtk_widget_show(GTK_WIDGET(main_wnd));
 
@@ -382,7 +382,7 @@
   gtk_tree_view_set_model(view, model1);
   gtk_tree_view_set_headers_visible(view, TRUE);
   gtk_tree_view_set_rules_hint(view, FALSE);
-  
+
   column = gtk_tree_view_column_new();
   gtk_tree_view_append_column(view, column);
   gtk_tree_view_column_set_title(column, "Options");
@@ -394,11 +394,11 @@
               renderer,
               "active", COL_BTNACT,
               "inconsistent", COL_BTNINC,
-              "visible", COL_BTNVIS, 
+              "visible", COL_BTNVIS,
               "radio", COL_BTNRAD, NULL);
   renderer = gtk_cell_renderer_text_new();
   gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column),
-          renderer, FALSE); 
+          renderer, FALSE);
   gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column),
               renderer,
               "text", COL_OPTION,
@@ -446,7 +446,7 @@
               renderer,
               "active", COL_BTNACT,
               "inconsistent", COL_BTNINC,
-              "visible", COL_BTNVIS, 
+              "visible", COL_BTNVIS,
               "radio", COL_BTNRAD, NULL);
   /*g_signal_connect(G_OBJECT(renderer), "toggled",
      G_CALLBACK(renderer_toggled), NULL); */
@@ -891,7 +891,7 @@
   gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h);
   gtk_paned_set_position(GTK_PANED(hpaned), w / 2);
   gtk_paned_set_position(GTK_PANED(vpaned), h / 2);
-  if (tree2)  
+  if (tree2)
     gtk_tree_store_clear(tree2);
   display_list();
 }
@@ -1577,7 +1577,7 @@
     if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) ||
         (view_mode == FULL_VIEW)
         || (view_mode == SPLIT_VIEW))*/
-    if ((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT) 
+    if ((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT)
     || (view_mode == FULL_VIEW) || (view_mode == SPLIT_VIEW)) {
       indent++;
       display_tree(child);

Modified: GNUnet/src/conf/gnunet-setup.c
===================================================================
--- GNUnet/src/conf/gnunet-setup.c      2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/gnunet-setup.c      2005-03-20 23:54:53 UTC (rev 464)
@@ -1,4 +1,4 @@
-/* 
+/*
      This file is part of GNUnet.
      (C) 2001, 2002, 2005 Christian Grothoff (and other contributing authors)
 
@@ -49,10 +49,10 @@
 extern void ShutdownWinEnv();
 #endif
 
-int main(int argc, 
+int main(int argc,
         char *argv[]) {
   if (argc < 3) {
-    help();    
+    help();
     return 0;
   }
 
@@ -74,7 +74,7 @@
     gconf_main(argc - 1, &argv[1]);
 #else
     puts("Gconfig is not available\n");
-#endif 
+#endif
  } else {
     puts("Unknown configurator\n\n");
     help();

Modified: GNUnet/src/conf/gnunet-win-tool.c
===================================================================
--- GNUnet/src/conf/gnunet-win-tool.c   2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/gnunet-win-tool.c   2005-03-20 23:54:53 UTC (rev 464)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file conf/gnunet-win-tool.c 
+ * @file conf/gnunet-win-tool.c
  * @brief tool for Windows specific tasks
  * @author Nils Durner
  */
@@ -44,8 +44,8 @@
     HELP_HELP,
     HELP_LOGLEVEL,
     { 'n', "netadapters", NULL, "list all network adapters" },
-    { 'i', "install", NULL, "install GNUnet as Windows service" },    
-    { 'u', "uninstall", NULL, "uninstall GNUnet service" },    
+    { 'i', "install", NULL, "install GNUnet as Windows service" },
+    { 'u', "uninstall", NULL, "uninstall GNUnet service" },
     { 'C', "increase-connections", NULL, "increase the maximum number of 
TCP/IP connections"},
     HELP_VERSION,
     HELP_END,
@@ -63,7 +63,7 @@
   PMIB_IFTABLE pTable;
   PMIB_IPADDRTABLE pAddrTable;
   DWORD dwIfIdx;
-  
+
   EnumNICs(&pTable, &pAddrTable);
 
   if (pTable)
@@ -76,7 +76,7 @@
       memcpy(bPhysAddr,
         pTable->table[dwIfIdx].bPhysAddr,
         pTable->table[dwIfIdx].dwPhysAddrLen);
-      
+
       printf("Index: %i\nAdapter name: %s\nID: %I64u\n",
         (int) pTable->table[dwIfIdx].dwIndex, pTable->table[dwIfIdx].bDescr,
         *((unsigned long long *) bPhysAddr));
@@ -84,9 +84,9 @@
       /* Get IP-Addresses */
       int i;
       for(i = 0; i < pAddrTable->dwNumEntries; i++)
-      {  
+      {
         if (pAddrTable->table[i].dwIndex == pTable->table[dwIfIdx].dwIndex)
-          printf("Address: %u.%u.%u.%u\n", 
+          printf("Address: %u.%u.%u.%u\n",
             PRIP(ntohl(pAddrTable->table[i].dwAddr)));
       }
       printf("\n");
@@ -103,13 +103,13 @@
 {
   HANDLE hManager, hService;
   char szEXE[_MAX_PATH + 17] = "\"";
-  
+
   if (! GNOpenSCManager)
   {
     printf("This version of Windows doesn't support services.\n");
     return;
   }
-  
+
   conv_to_win_path("/bin/gnunetd.exe", szEXE + 1);
   strcat(szEXE, "\" --win-service");
   hManager = GNOpenSCManager(NULL, NULL, SC_MANAGER_CREATE_SERVICE);
@@ -119,7 +119,7 @@
     printf("Error: can't open Service Control Manager: %s\n", 
_win_strerror(errno));
     return;
   }
-  
+
   hService = GNCreateService(hManager, "GNUnet", "GNUnet", 0,
     SERVICE_WIN32_OWN_PROCESS, SERVICE_AUTO_START, SERVICE_ERROR_NORMAL, szEXE,
     NULL, NULL, NULL, NULL, NULL);
@@ -130,9 +130,9 @@
     printf("Error: can't create service: %s\n", _win_strerror(errno));
     return;
   }
-  
+
   GNCloseServiceHandle(hService);
-  
+
   printf("GNUnet service installed successfully.\n");
 }
 
@@ -148,7 +148,7 @@
     printf("This version of Windows doesn't support services.\n");
     return;
   }
-  
+
   hManager = GNOpenSCManager(NULL, NULL, SC_MANAGER_CONNECT);
   if (! hManager)
   {
@@ -163,16 +163,16 @@
     printf("Error: can't access service: %s\n", _win_strerror(errno));
     return;
   }
-  
+
   if (! GNDeleteService(hService))
   {
     SetErrnoFromWinError(GetLastError());
     printf("Error: can't delete service: %s\n", _win_strerror(errno));
     return;
   }
-  
+
   GNCloseServiceHandle(hService);
-  
+
   printf("Service deleted.\n");
 }
 
@@ -187,7 +187,7 @@
   char szCache[_MAX_PATH + 1], szDriver[_MAX_PATH + 1];
   unsigned long lMem;
   char *pMem;
-  
+
   puts("Warning: This modifies your operating system. Use it at your own 
risk.\nContinue?[Y/n]");
   switch(_getch())
   {
@@ -201,12 +201,12 @@
       return;
   }
   puts("Y\n");
-  
+
   /* Step 1: Registry setting,
      see http://support.microsoft.com/default.aspx?scid=kb;EN-US;314053 */
   printf("Writing to registry... ");
   if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\"
-                                       "Tcpip\\Parameters\\Winsock", 0, 
+                                       "Tcpip\\Parameters\\Winsock", 0,
                    KEY_WRITE, &hKey) != ERROR_SUCCESS)
   {
     DWORD dwErr = GetLastError();
@@ -216,7 +216,7 @@
   else
   {
     DWORD dwCon = 0xfffffe;
-    if (RegSetValueEx(hKey, "TcpNumConnections", 0, REG_DWORD, 
+    if (RegSetValueEx(hKey, "TcpNumConnections", 0, REG_DWORD,
                       (const BYTE *) &dwCon, sizeof(dwCon)) != ERROR_SUCCESS)
     {
       DWORD dwErr = GetLastError();
@@ -227,7 +227,7 @@
       printf("OK.\n");
     RegCloseKey(hKey);
   }
-  
+
   /* Step 2: Patch tcpip.sys */
   printf("Patching tcpip.sys... ");
   snprintf(szCache, _MAX_PATH, "%s\\SYSTEM32\\DLLCACHE\\tcpip.sys", 
getenv("windir"));
@@ -238,13 +238,13 @@
     printf("failed.\n Cannot open %s\n", szCache);
     return;
   }
-  
+
   if (fseek(pFile, 0, SEEK_END))
   {
     printf("failed.\n Cannot seek.\n");
     return;
   }
-  
+
   lMem = ftell(pFile);
   pMem = malloc(lMem);
   if (! pMem)
@@ -253,7 +253,7 @@
     fclose(pFile);
     return;
   }
-  
+
   fseek(pFile, 0, SEEK_SET);
   fread(pMem, 1, lMem, pFile);
 
@@ -262,7 +262,7 @@
     case 2151852539:
       memcpy(pMem + 0x130, chunk1, 4);
       memcpy(pMem + 0x4F322, chunk2, 4);
-      break;   
+      break;
     case 2437296753:
       printf("already patched.\n");
       free(pMem);
@@ -274,7 +274,7 @@
       fclose(pFile);
       return;
   }
-  
+
   fseek(pFile, 0, SEEK_SET);
   fwrite(pMem, 1, lMem, pFile);
   fclose(pFile);
@@ -304,7 +304,7 @@
   getFileHash(hashFile, &code);
   hash2enc(&code, &hex);
   printf("RIPEMD160(%s)= ", hashFile);
-  
+
   /* Flip byte order */
   c = (char *) hex.encoding;
   while(*c)
@@ -332,34 +332,34 @@
 
   while (1) {
     static struct GNoption long_options[] = {
-      { "netadapters",          0, 0, 'n' }, 
-      { "install",              0, 0, 'i' }, 
-      { "uninstall",            0, 0, 'u' }, 
+      { "netadapters",          0, 0, 'n' },
+      { "install",              0, 0, 'i' },
+      { "uninstall",            0, 0, 'u' },
       { "increase-connections", 0, 0, 'C' },
       { "filehash",             1, 0, 'R' },
       LONG_DEFAULT_OPTIONS,
       { 0,0,0,0 }
-    };    
+    };
     option_index = 0;
     c = GNgetopt_long(argc,
-                     argv, 
-                     "vhdc:L:H:niuCR:", 
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     argv,
+                     "vhdc:L:H:niuCR:",
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
-    
+
     bPrintHelp = FALSE;
-      
+
     if (YES == parseDefaultOptions(c, GNoptarg))
       continue;
     switch(c) {
-      case 'v': 
+      case 'v':
         printf("GNUnet v%s, gnunet-win-tool v%s\n",
              VERSION, WINTOOL_VERSION);
         return SYSERR;
-      case 'h': 
-        printhelp(); 
+      case 'h':
+        printhelp();
         return SYSERR;
       case 'n':
         bPrintAdapters = YES;
@@ -377,7 +377,7 @@
         hashFile = MALLOC(strlen(GNoptarg) + 1);
         strcpy(hashFile, GNoptarg);
         break;
-      default: 
+      default:
         LOG(LOG_FAILURE,
                  "Unknown option %c. Aborting.\n"\
                  "Use --help to get a list of options.\n",
@@ -385,13 +385,13 @@
         return -1;
     } /* end of parsing commandline */
   } /* while (1) */
-  
+
   if (bPrintHelp) {
     printhelp();
-    
+
     return SYSERR;
   }
-  
+
   return OK;
 }
 
@@ -401,7 +401,7 @@
  * @param argc number of arguments from the command line
  * @param argv command line arguments
  * @return 0 ok, 1 on error
- */   
+ */
 int main(int argc, char ** argv) {
   int res;
 

Modified: GNUnet/src/conf/images.c
===================================================================
--- GNUnet/src/conf/images.c    2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/images.c    2005-03-20 23:54:53 UTC (rev 464)
@@ -5,7 +5,7 @@
 
 /**
  * @brief GNUnet Setup
- * @file 
+ * @file
  * @author Roman Zippel
  */
 

Modified: GNUnet/src/conf/lex.zconf.c
===================================================================
--- GNUnet/src/conf/lex.zconf.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/lex.zconf.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -42,7 +42,7 @@
 typedef signed char flex_int8_t;
 typedef short int flex_int16_t;
 typedef int flex_int32_t;
-typedef unsigned char flex_uint8_t; 
+typedef unsigned char flex_uint8_t;
 typedef unsigned short int flex_uint16_t;
 typedef unsigned int flex_uint32_t;
 #endif /* ! C99 */
@@ -148,7 +148,7 @@
 #define EOB_ACT_LAST_MATCH 2
 
     #define YY_LESS_LINENO(n)
-    
+
 /* Return all but the first "n" matched characters back to the input stream. */
 #define yyless(n) \
        do \
@@ -215,7 +215,7 @@
 
     int yy_bs_lineno; /**< The line count. */
     int yy_bs_column; /**< The column count. */
-    
+
        /* Whether to try to fill the input buffer when we reach the
         * end of it.
         */
@@ -2094,7 +2094,7 @@
 #endif
 
     static void yyunput (int c,char *buf_ptr  );
-    
+
 #ifndef yytext_ptr
 static void yy_flex_strncpy (char *,yyconst char *,int );
 #endif
@@ -2199,7 +2199,7 @@
        register yy_state_type yy_current_state;
        register char *yy_cp, *yy_bp;
        register int yy_act;
-    
+
        int str = 0;
        int ts, i;
 
@@ -2904,7 +2904,7 @@
 {
        register yy_state_type yy_current_state;
        register char *yy_cp;
-    
+
        yy_current_state = (yy_start);
 
        for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp 
)
@@ -2923,7 +2923,7 @@
     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
 {
        register int yy_is_jam;
-    
+
        yy_current_state = yy_nxt[yy_current_state][1];
        yy_is_jam = (yy_current_state <= 0);
 
@@ -2933,7 +2933,7 @@
     static void yyunput (int c, register char * yy_bp )
 {
        register char *yy_cp;
-    
+
     yy_cp = (yy_c_buf_p);
 
        /* undo effects of setting up zconftext */
@@ -2976,7 +2976,7 @@
 
 {
        int c;
-    
+
        *(yy_c_buf_p) = (yy_hold_char);
 
        if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
@@ -3043,12 +3043,12 @@
 
 /** Immediately switch to a different input stream.
  * @param input_file A readable stream.
- * 
+ *
  * @note This function does not reset the start condition to @c INITIAL .
  */
     void zconfrestart  (FILE * input_file )
 {
-    
+
        if ( ! YY_CURRENT_BUFFER ){
         zconfensure_buffer_stack ();
                YY_CURRENT_BUFFER_LVALUE =
@@ -3061,11 +3061,11 @@
 
 /** Switch to a different input buffer.
  * @param new_buffer The new input buffer.
- * 
+ *
  */
     void zconf_switch_to_buffer  (YY_BUFFER_STATE  new_buffer )
 {
-    
+
        /* TODO. We should be able to replace this entire function body
         * with
         *              zconfpop_buffer_state();
@@ -3105,13 +3105,13 @@
 /** Allocate and initialize an input buffer state.
  * @param file A readable stream.
  * @param size The character buffer size in bytes. When in doubt, use @c 
YY_BUF_SIZE.
- * 
+ *
  * @return the allocated buffer state.
  */
     YY_BUFFER_STATE zconf_create_buffer  (FILE * file, int  size )
 {
        YY_BUFFER_STATE b;
-    
+
        b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state )  );
        if ( ! b )
                YY_FATAL_ERROR( "out of dynamic memory in 
zconf_create_buffer()" );
@@ -3134,11 +3134,11 @@
 
 /** Destroy the buffer.
  * @param b a buffer created with zconf_create_buffer()
- * 
+ *
  */
     void zconf_delete_buffer (YY_BUFFER_STATE  b )
 {
-    
+
        if ( ! b )
                return;
 
@@ -3159,7 +3159,7 @@
 
 {
        int oerrno = errno;
-    
+
        zconf_flush_buffer(b );
 
        b->yy_input_file = file;
@@ -3175,13 +3175,13 @@
     }
 
         b->yy_is_interactive = 0;
-    
+
        errno = oerrno;
 }
 
 /** Discard all buffered characters. On the next scan, YY_INPUT will be called.
  * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER.
- * 
+ *
  */
     void zconf_flush_buffer (YY_BUFFER_STATE  b )
 {
@@ -3210,7 +3210,7 @@
  *  the current state. This function will allocate the stack
  *  if necessary.
  *  @param new_buffer The new state.
- *  
+ *
  */
 void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer )
 {
@@ -3240,7 +3240,7 @@
 
 /** Removes and deletes the top of the stack, if present.
  *  The next element becomes the new top.
- *  
+ *
  */
 void zconfpop_buffer_state (void)
 {
@@ -3264,7 +3264,7 @@
 static void zconfensure_buffer_stack (void)
 {
        int num_to_alloc;
-    
+
        if (!(yy_buffer_stack)) {
 
                /* First allocation is just for 2 elements, since we don't know 
if this
@@ -3303,13 +3303,13 @@
 /** Setup the input buffer state to scan directly from a user-specified 
character buffer.
  * @param base the character buffer
  * @param size the size in bytes of the character buffer
- * 
- * @return the newly allocated buffer state object. 
+ *
+ * @return the newly allocated buffer state object.
  */
 YY_BUFFER_STATE zconf_scan_buffer  (char * base, yy_size_t  size )
 {
        YY_BUFFER_STATE b;
-    
+
        if ( size < 2 ||
             base[size-2] != YY_END_OF_BUFFER_CHAR ||
             base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -3338,14 +3338,14 @@
 /** Setup the input buffer state to scan a string. The next call to zconflex() 
will
  * scan from a @e copy of @a str.
  * @param str a NUL-terminated string to scan
- * 
+ *
  * @return the newly allocated buffer state object.
  * @note If you want to scan bytes that may contain NUL values, then use
  *       zconf_scan_bytes() instead.
  */
 YY_BUFFER_STATE zconf_scan_string (yyconst char * yy_str )
 {
-    
+
        return zconf_scan_bytes(yy_str,strlen(yy_str) );
 }
 
@@ -3353,7 +3353,7 @@
  * scan from a @e copy of @a bytes.
  * @param bytes the byte buffer to scan
  * @param len the number of bytes in the buffer pointed to by @a bytes.
- * 
+ *
  * @return the newly allocated buffer state object.
  */
 YY_BUFFER_STATE zconf_scan_bytes  (yyconst char * bytes, int  len )
@@ -3362,7 +3362,7 @@
        char *buf;
        yy_size_t n;
        int i;
-    
+
        /* Get memory for full buffer, including space for trailing EOB's. */
        n = len + 2;
        buf = (char *) zconfalloc(n  );
@@ -3416,16 +3416,16 @@
 /* Accessor  methods (get/set functions) to struct members. */
 
 /** Get the current line number.
- * 
+ *
  */
 int zconfget_lineno  (void)
 {
-        
+
     return zconflineno;
 }
 
 /** Get the input stream.
- * 
+ *
  */
 FILE *zconfget_in  (void)
 {
@@ -3433,7 +3433,7 @@
 }
 
 /** Get the output stream.
- * 
+ *
  */
 FILE *zconfget_out  (void)
 {
@@ -3441,7 +3441,7 @@
 }
 
 /** Get the length of the current token.
- * 
+ *
  */
 int zconfget_leng  (void)
 {
@@ -3449,7 +3449,7 @@
 }
 
 /** Get the current token.
- * 
+ *
  */
 
 char *zconfget_text  (void)
@@ -3459,18 +3459,18 @@
 
 /** Set the current line number.
  * @param line_number
- * 
+ *
  */
 void zconfset_lineno (int  line_number )
 {
-    
+
     zconflineno = line_number;
 }
 
 /** Set the input stream. This does not discard the current
  * input buffer.
  * @param in_str A readable stream.
- * 
+ *
  * @see zconf_switch_to_buffer
  */
 void zconfset_in (FILE *  in_str )
@@ -3496,7 +3496,7 @@
 /* zconflex_destroy is for both reentrant and non-reentrant scanners. */
 int zconflex_destroy  (void)
 {
-    
+
     /* Pop the buffer stack, destroying each element. */
        while(YY_CURRENT_BUFFER){
                zconf_delete_buffer(YY_CURRENT_BUFFER  );

Modified: GNUnet/src/conf/lkc_proto.h
===================================================================
--- GNUnet/src/conf/lkc_proto.h 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/lkc_proto.h 2005-03-20 23:54:53 UTC (rev 464)
@@ -1,7 +1,7 @@
 
 /**
  * @brief GNUnet Setup
- * @file conf/lkc_proto.h 
+ * @file conf/lkc_proto.h
  * @author Roman Zippel
  * @author Nils Durner
  **/

Modified: GNUnet/src/conf/mconf.c
===================================================================
--- GNUnet/src/conf/mconf.c     2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/mconf.c     2005-03-20 23:54:53 UTC (rev 464)
@@ -91,13 +91,13 @@
        "\n"
        "If you are uncertain what all this means then you should probably\n"
        "leave this blank.\n",
-readme_text[] = 
+readme_text[] =
        "Overview\n"
        "--------\n"
-       "To change a setting, highlight it with the cursor\n" 
+       "To change a setting, highlight it with the cursor\n"
        "keys and press <Y> to enable it or <N> to removed it.\n"
        "\n"
-       "Items beginning with numbers or other text within parenthesis can\n" 
+       "Items beginning with numbers or other text within parenthesis can\n"
        "be changed by highlighting the item and pressing <Enter>.  Then\n"
        "enter the new value into the dialog box that pops up.\n"
        "\n"
@@ -106,7 +106,7 @@
        "\n"
        "Menus\n"
        "----------\n"
-       "o  Use the Up/Down arrow keys (cursor keys) to highlight the item\n" 
+       "o  Use the Up/Down arrow keys (cursor keys) to highlight the item\n"
        "   you wish to change or submenu wish to select and press <Enter>.\n"
        "   Submenus are designated by \"--->\".\n"
        "\n"
@@ -118,7 +118,7 @@
        "   unseen options into view.\n"
        "\n"
        "o  To exit a menu use the cursor keys to highlight the <Exit> button\n"
-       "   and press <ENTER>.\n"  
+       "   and press <ENTER>.\n"
        "\n"
        "   Shortcut: Press <ESC><ESC> or <E> or <X> if there is no hotkey\n"
         "             using those letters.  You may press a single <ESC>, 
but\n"
@@ -177,7 +177,7 @@
        "Alternate Configuration Files\n"
        "-----------------------------\n"
        "Menuconfig supports the use of alternate configuration files for\n"
-       "those who, for various reasons, find it necessary to switch\n" 
+       "those who, for various reasons, find it necessary to switch\n"
        "between different configurations.\n"
        "\n"
        "At the end of the main menu you will find two options.  One is\n"
@@ -185,15 +185,15 @@
        "The other option is for loading a previously saved alternate\n"
        "configuration.\n"
        "\n"
-       "Even if you don't use alternate configuration files, but you\n" 
+       "Even if you don't use alternate configuration files, but you\n"
        "find during a Menuconfig session that you have completely messed\n"
        "up your settings, you may use the \"Load Alternate...\" option to\n"
-       "restore your previously saved settings from \".config\" without\n" 
+       "restore your previously saved settings from \".config\" without\n"
        "restarting Menuconfig.\n"
        "\n"
        "Other information\n"
        "-----------------\n"
-       "If you use Menuconfig in an XTERM window make sure you have your\n" 
+       "If you use Menuconfig in an XTERM window make sure you have your\n"
        "$TERM variable set to point to a xterm definition which supports 
color.\n"
        "Otherwise, Menuconfig will look rather bad.  Menuconfig will not\n"
        "display correctly in a RXVT window because rxvt displays only one\n"
@@ -529,7 +529,7 @@
                        cmake(); cset_tag('S', NULL); cprint_name("Save 
Configuration to an Alternate File");
                }
                dialog_clear();
-               /* active_item itself can change after any creset() + 
+               /* active_item itself can change after any creset() +
                  * build_conf() :-( */
                stat = dialog_menu(prompt ? prompt : "Main Menu",
                                menu_instructions, rows, cols, rows - 10,

Modified: GNUnet/src/conf/mconf_checklist.c
===================================================================
--- GNUnet/src/conf/mconf_checklist.c   2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/mconf_checklist.c   2005-03-20 23:54:53 UTC (rev 464)
@@ -201,7 +201,7 @@
 
     /* Find length of longest item in order to center checklist */
     check_x = 0;
-    for (i = 0; i < item_no; i++) 
+    for (i = 0; i < item_no; i++)
       check_x = MAX (check_x, + (int) strlen (items[i]->name) + 4);
 
     check_x = (list_width - check_x) / 2;
@@ -238,7 +238,7 @@
                 break;
 
 
-       if ( i < max_choice || key == KEY_UP || key == KEY_DOWN || 
+       if ( i < max_choice || key == KEY_UP || key == KEY_DOWN ||
            key == '+' || key == '-' ) {
            if (key == KEY_UP || key == '-') {
                if (!choice) {
@@ -350,7 +350,7 @@
                }
                wnoutrefresh (list);
                wrefresh (dialog);
-            
+
                for (i = 0; i < item_no; i++) {
                        items[i]->selected = status[i];
                }
@@ -368,8 +368,8 @@
        /* Now, update everything... */
        doupdate ();
     }
-    
 
+
     delwin (dialog);
     free (status);
     return -1;                 /* ESC pressed */

Modified: GNUnet/src/conf/mconf_colors.h
===================================================================
--- GNUnet/src/conf/mconf_colors.h      2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/mconf_colors.h      2005-03-20 23:54:53 UTC (rev 464)
@@ -20,7 +20,7 @@
 
 /**
  * @brief GNUnet Setup
- * @file conf/mconf_colors.h 
+ * @file conf/mconf_colors.h
  * @author Savio Lam
  * @author Nils Durner
  **/

Modified: GNUnet/src/conf/mconf_dialog.h
===================================================================
--- GNUnet/src/conf/mconf_dialog.h      2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/mconf_dialog.h      2005-03-20 23:54:53 UTC (rev 464)
@@ -99,7 +99,7 @@
 #define ACS_DARROW 'v'
 #endif
 
-/* 
+/*
  * Attribute names
  */
 #define screen_attr                   attributes[0]

Modified: GNUnet/src/conf/mconf_menubox.c
===================================================================
--- GNUnet/src/conf/mconf_menubox.c     2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/mconf_menubox.c     2005-03-20 23:54:53 UTC (rev 464)
@@ -26,7 +26,7 @@
  *
  *    *)  A bugfix for the Page-Down problem
  *
- *    *)  Formerly when I used Page Down and Page Up, the cursor would be set 
+ *    *)  Formerly when I used Page Down and Page Up, the cursor would be set
  *        to the first position in the menu box.  Now lxdialog is a bit
  *        smarter and works more like other menu systems (just have a look at
  *        it).
@@ -58,7 +58,7 @@
 
 /**
  * @brief GNUnet Setup
- * @file conf/mconf_menubox.c 
+ * @file conf/mconf_menubox.c
  * @author Savio Lam
  * @author Nils Durner
  */
@@ -232,7 +232,7 @@
 
     /*
      * Find length of longest item in order to center menu.
-     * Set 'choice' to default item. 
+     * Set 'choice' to default item.
      */
     item_x = 0;
     for (i = 0; i < item_no; i++) {
@@ -305,7 +305,7 @@
                }
        }
 
-       if (i < max_choice || 
+       if (i < max_choice ||
             key == KEY_UP || key == KEY_DOWN ||
             key == '-' || key == '+' ||
             key == KEY_PPAGE || key == KEY_NPAGE) {

Modified: GNUnet/src/conf/mconf_msgbox.c
===================================================================
--- GNUnet/src/conf/mconf_msgbox.c      2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/mconf_msgbox.c      2005-03-20 23:54:53 UTC (rev 464)
@@ -80,7 +80,7 @@
 
        wrefresh (dialog);
        while (key != ESC && key != '\n' && key != ' ' &&
-               key != 'O' && key != 'o' && key != 'X' && key != 'x' 
+               key != 'O' && key != 'o' && key != 'X' && key != 'x'
 #ifdef KEY_RESIZE
               && key != KEY_RESIZE
 #endif

Modified: GNUnet/src/conf/mconf_util.c
===================================================================
--- GNUnet/src/conf/mconf_util.c        2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/mconf_util.c        2005-03-20 23:54:53 UTC (rev 464)
@@ -36,7 +36,7 @@
 
 const char *dialog_result;
 
-/* 
+/*
  * Attribute values, default is for mono display
  */
 chtype attributes[] =
@@ -391,7 +391,7 @@
                if (strchr("<[(", c)) ++in_paren;
                if (strchr(">])", c) && in_paren > 0) --in_paren;
 
-               if ((! in_paren) && isalpha(c) && 
+               if ((! in_paren) && isalpha(c) &&
                     strchr(exempt, c) == 0)
                        return i;
        }

Modified: GNUnet/src/conf/mconf_yesno.c
===================================================================
--- GNUnet/src/conf/mconf_yesno.c       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/mconf_yesno.c       2005-03-20 23:54:53 UTC (rev 464)
@@ -70,7 +70,7 @@
     wattrset (dialog, dialog_attr);
     waddch (dialog, ACS_RTEE);
 
-    if ( (title != NULL) && 
+    if ( (title != NULL) &&
         (strlen(title) >= (unsigned int) width-2) ) {
        /* truncate long title -- mec */
        char * title2 = malloc(width-2+1);

Modified: GNUnet/src/conf/zconf_tab.c
===================================================================
--- GNUnet/src/conf/zconf_tab.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/conf/zconf_tab.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -450,21 +450,21 @@
    First, the terminals, then, starting at YYNTOKENS, nonterminals. */
 static const char *const yytname[] =
 {
-  "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU", 
-  "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", 
-  "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", 
-  "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_DEFAULT", "T_TRISTATE", 
-  "T_DEF_TRISTATE", "T_BOOLEAN", "T_DEF_BOOLEAN", "T_STRING", "T_INT", 
-  "T_HEX", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", "T_EOF", "T_EOL", 
-  "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_ON", "T_SELECT", "T_RANGE", "T_OR", 
-  "T_AND", "T_EQUAL", "T_NOT", "$accept", "input", "block", 
-  "common_block", "config_entry_start", "config_stmt", 
-  "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", 
-  "config_option", "choice", "choice_entry", "choice_end", "choice_stmt", 
-  "choice_option_list", "choice_option", "choice_block", "if", "if_end", 
-  "if_stmt", "if_block", "menu", "menu_entry", "menu_end", "menu_stmt", 
-  "menu_block", "source", "source_stmt", "comment", "comment_stmt", 
-  "help_start", "help", "depends_list", "depends", "prompt_stmt_opt", 
+  "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU",
+  "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG",
+  "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS",
+  "T_REQUIRES", "T_OPTIONAL", "T_PROMPT", "T_DEFAULT", "T_TRISTATE",
+  "T_DEF_TRISTATE", "T_BOOLEAN", "T_DEF_BOOLEAN", "T_STRING", "T_INT",
+  "T_HEX", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", "T_EOF", "T_EOL",
+  "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_ON", "T_SELECT", "T_RANGE", "T_OR",
+  "T_AND", "T_EQUAL", "T_NOT", "$accept", "input", "block",
+  "common_block", "config_entry_start", "config_stmt",
+  "menuconfig_entry_start", "menuconfig_stmt", "config_option_list",
+  "config_option", "choice", "choice_entry", "choice_end", "choice_stmt",
+  "choice_option_list", "choice_option", "choice_block", "if", "if_end",
+  "if_stmt", "if_block", "menu", "menu_entry", "menu_end", "menu_stmt",
+  "menu_block", "source", "source_stmt", "comment", "comment_stmt",
+  "help_start", "help", "depends_list", "depends", "prompt_stmt_opt",
   "prompt", "section", "end", "nl_or_eof", "if_expr", "expr", "symbol", 0
 };
 #endif
@@ -1027,7 +1027,7 @@
 #endif
 #endif
 {
-  
+
   register int yystate;
   register int yyn;
   int yyresult;

Modified: GNUnet/src/include/ecrs_core.h
===================================================================
--- GNUnet/src/include/ecrs_core.h      2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/include/ecrs_core.h      2005-03-20 23:54:53 UTC (rev 464)
@@ -59,9 +59,9 @@
  * required to download (and check) a file.
  */
 typedef struct {
-  
+
   /**
-   * Total size of the file in bytes. (network byte order (!)) 
+   * Total size of the file in bytes. (network byte order (!))
    */
   unsigned long long file_length;
 
@@ -81,7 +81,7 @@
   /**
    * Key generated (!) from the H(keyword) as the seed!
    */
-  PublicKey keyspace; 
+  PublicKey keyspace;
 
   /* 0-terminated URI here */
   /* variable-size Meta-Data follows here! */
@@ -92,15 +92,15 @@
 
   Signature signature; /* 256 b */
   /**
-   * S = H(subspace); 264 b 
+   * S = H(subspace); 264 b
    */
-  PublicKey subspace; 
+  PublicKey subspace;
 
   /* from here on signed */
   /**
    * R = H(N-I)^S, used for routing!
-   */ 
-  HashCode512 identifier; 
+   */
+  HashCode512 identifier;
   /* from here on encrypted */
   cron_t creationTime; /* in network byte order */
   cron_t updateInterval; /* in network byte order */
@@ -117,15 +117,15 @@
 
   PublicKey subspace; /* S = H(subspace); 264 b */
   /**
-   * Must be all zeros 
-   */ 
-  HashCode512 identifier; 
+   * Must be all zeros
+   */
+  HashCode512 identifier;
   /* The REST (from here on) is encrypted! */
   /**
    * Identifier of the namespace
    */
   HashCode512 namespace;
-  
+
   /**
    * Key of an (optional) root entry into the namespace
    * (use all-zeros for not given).
@@ -147,7 +147,7 @@
 
 
 /**
- * Perform on-demand content encoding.  
+ * Perform on-demand content encoding.
  *
  * @param data the data to encode
  * @param len the length of the data

Modified: GNUnet/src/include/fs.h
===================================================================
--- GNUnet/src/include/fs.h     2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/include/fs.h     2005-03-20 23:54:53 UTC (rev 464)
@@ -36,7 +36,7 @@
 typedef struct {
   CS_HEADER header;
 
-  /** 
+  /**
    * Priority of the search.
    */
   unsigned int prio;
@@ -85,7 +85,7 @@
 typedef struct {
   CS_HEADER header;
 
-  /** 
+  /**
    * Priority for the on-demand encoded entry.
    */
   unsigned int prio;
@@ -117,7 +117,7 @@
    * this block?
    */
   HashCode512 fileId;
-  
+
 } RequestInitIndex;
 
 /**
@@ -128,7 +128,7 @@
 typedef struct {
   CS_HEADER header;
 
-  /** 
+  /**
    * Priority for the on-demand encoded entry.
    */
   unsigned int prio;

Modified: GNUnet/src/include/gettext.h
===================================================================
--- GNUnet/src/include/gettext.h        2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/include/gettext.h        2005-03-20 23:54:53 UTC (rev 464)
@@ -53,8 +53,8 @@
     ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
 /* slight modification here to avoid warnings: generate NO code,
    not even the cast... */
-# define textdomain(Domainname) 
-# define bindtextdomain(Domainname, Dirname) 
+# define textdomain(Domainname)
+# define bindtextdomain(Domainname, Dirname)
 # define bind_textdomain_codeset(Domainname, Codeset) ((const char *) 
(Codeset))
 
 #endif

Modified: GNUnet/src/include/gnunet_blockstore.h
===================================================================
--- GNUnet/src/include/gnunet_blockstore.h      2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_blockstore.h      2005-03-20 23:54:53 UTC (rev 
464)
@@ -62,7 +62,7 @@
  * routing, the other parts are just passed along and untouched by the
  * routing code.  The type is typically used to tell what they refer
  * to.  The assumption is that they (including the type) can be
- * reproduced from the DataContainer and thus the Iterator 
+ * reproduced from the DataContainer and thus the Iterator
  * methods do not communicate those values.
  *
  * The put method is (ab)used to check an item that is merely routed
@@ -93,7 +93,7 @@
             const HashCode512 * keys,
             DataProcessor resultCallback,
             void * resCallbackClosure);
-  
+
   /**
    * Store an item in the datastore.
    *
@@ -127,7 +127,7 @@
    * @param cls argument to processor
    * @return number of results, SYSERR on error
    */
-  int (*iterate)(void * closure,                
+  int (*iterate)(void * closure,               
                 DataProcessor processor,
                 void * cls);
 

Modified: GNUnet/src/include/gnunet_bootstrap_service.h
===================================================================
--- GNUnet/src/include/gnunet_bootstrap_service.h       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/include/gnunet_bootstrap_service.h       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -44,7 +44,7 @@
    * Obtain HELOs (i.e. by downloading form the web) and call the
    * callback on each HELO.
    *
-   * @param callback the method to call 
+   * @param callback the method to call
    * @param arg extra argument to the method
    */
   void (*bootstrap)(HELO_Callback callback,

Modified: GNUnet/src/include/gnunet_core.h
===================================================================
--- GNUnet/src/include/gnunet_core.h    2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/include/gnunet_core.h    2005-03-20 23:54:53 UTC (rev 464)
@@ -30,11 +30,11 @@
 
 /**
  * Just the version number of GNUnet-core API.
- * Encoded as 
+ * Encoded as
  * 0.6.1d  => 0x00060100
  * 4.5.2   => 0x04050200
- * 
- * Note that this version number is only changed if 
+ *
+ * Note that this version number is only changed if
  * something changes in the core API.  It follows
  * roughly the main GNUnet version scheme, but is
  * more a compatibility ID.
@@ -50,7 +50,7 @@
 
 /**
  * Opaque handle for a session representation on the transport
- * layer side 
+ * layer side
  */
 typedef struct {
   unsigned short ttype;
@@ -71,42 +71,42 @@
   p2p_HEADER header;
 
   /**
-   * The signature 
+   * The signature
    */
   Signature signature;
 
   /**
-   * The public key 
+   * The public key
    */
-  PublicKey publicKey; 
+  PublicKey publicKey;
 
   /**
    * Whose identity follows? No, this is NOT a duplicate
-   * as a node may send us the identity of ANOTHER node! 
+   * as a node may send us the identity of ANOTHER node!
    */
-  PeerIdentity senderIdentity; 
+  PeerIdentity senderIdentity;
 
   /**
-   * time this address expires  (network byte order) 
-   */ 
+   * time this address expires  (network byte order)
+   */
   TIME_T expirationTime;
 
   /**
    * advertised MTU for sending (replies can have a different
-   * MTU!) 
+   * MTU!)
    */
   unsigned int MTU;
 
   /**
-   * size of the sender address 
+   * size of the sender address
    */
   unsigned short senderAddressSize;
 
   /**
    * protocol supported by the node (only one protocol
-   * can be advertised by the same HELO) 
+   * can be advertised by the same HELO)
    * Examples are UDP, TCP, etc. This field is
-   * in network byte order 
+   * in network byte order
    */
   unsigned short protocol;
 
@@ -116,12 +116,12 @@
   HELO_Message helo_message;
 
   /**
-   * address of the node in a protocol specific format 
-   */ 
-  char senderAddress[1]; 
-  
-} HELO_Message_GENERIC;  
+   * address of the node in a protocol specific format
+   */
+  char senderAddress[1];
 
+} HELO_Message_GENERIC;
+
 #define HELO_Message_size(helo) ((sizeof(HELO_Message) + 
ntohs((helo)->senderAddressSize)))
 
 /**
@@ -138,7 +138,7 @@
 
 /**
  * Method called whenever a given client disconnects.
- */ 
+ */
 typedef void (*ClientExitHandler)(ClientHandle client);
 
 /**
@@ -314,7 +314,7 @@
                          void * closure,
                          unsigned short len,
                          unsigned int importance,
-                         unsigned int maxdelay);  
+                         unsigned int maxdelay);
 
   /**
    * Perform an operation for all connected hosts.
@@ -323,14 +323,14 @@
    * @param method the method to invoke (NULL for counting only)
    * @param arg the second argument to the method
    * @return the number of connected hosts
-   */ 
+   */
   int (*forAllConnectedNodes)(PerNodeCallback method,
                              void * arg);
 
   /**
    * Register a callback method that should be invoked whenever a message
    * is about to be send that has more than minimumPadding bytes left
-   * before maxing out the MTU. 
+   * before maxing out the MTU.
    * The callback method can then be used to add additional content
    * to the message (instead of the random noise that is added by
    * otherwise). Note that if the MTU is 0 (for streams), the
@@ -349,7 +349,7 @@
    */
   int (*registerSendCallback)(const unsigned int minimumPadding,
                              BufferFillCallback callback);
-  
+
   /**
    * Unregister a handler that was registered with registerSendCallback.
    * @return OK if the handler was removed, SYSERR on error
@@ -359,7 +359,7 @@
 
   /**
    * Register a handler that is to be called for each
-   * message that leaves the peer. 
+   * message that leaves the peer.
    *
    * @param callback the method to call for each
    *        P2P message part that is transmitted
@@ -369,15 +369,15 @@
 
   /**
    * Unregister a handler that is to be called for each
-   * message that leaves the peer. 
+   * message that leaves the peer.
    *
    * @param callback the method to call for each
    *        P2P message part that is transmitted
    * @return OK on success, SYSERR if there is a problem
    */
   int (*unregisterSendNotify)(MessagePartHandler callback);
-  
 
+
   /* ********************* handlers ***************** */
 
   /**
@@ -391,7 +391,7 @@
    */
   int (*registerHandler)(const unsigned short type,
                         MessagePartHandler callback);
-  
+
   /**
    * Unregister a method as a handler for specific message
    * types. Only for encrypted messages!
@@ -415,7 +415,7 @@
    */
   int (*registerPlaintextHandler)(const unsigned short type,
                                  PlaintextMessagePartHandler callback);
-  
+
   /**
    * Unregister a method as a handler for specific message
    * types. Only for encrypted messages!
@@ -435,7 +435,7 @@
    * Offer the core a session for communication with the
    * given peer.  This is useful after establishing a connection
    * with another peer to hand it of to the core.  Note that
-   * the core will take over the session and disconnect 
+   * the core will take over the session and disconnect
    * it as it feels like.  Thus the client should no longer
    * use it after this call.  If the core does not want/need
    * the session, it will also be disconnected.
@@ -447,7 +447,7 @@
    * Assign a session key for traffic from or to a given peer.
    * If the core does not yet have an entry for the given peer
    * in the connection table, a new entry is created.
-   * 
+   *
    * @param key the sessionkey,
    * @param peer the other peer,
    * @param forSending NO if it is the key for receiving,
@@ -460,7 +460,7 @@
 
   /**
    * Obtain the session key used for traffic from or to a given peer.
-   * 
+   *
    * @param key the sessionkey (set)
    * @param age the age of the key (set)
    * @param peer the other peer,
@@ -562,7 +562,7 @@
    * @return OK on success, SYSERR on error
    */
   int (*registerClientExitHandler)(ClientExitHandler callback);
-  
+
   /**
    * Unregister a handler to call if any client exits.
    * @param callback a method to call with the socket
@@ -570,7 +570,7 @@
    * @return OK on success, SYSERR on error
    */
   int (*unregisterClientExitHandler)(ClientExitHandler callback);
-  
+
   /**
    * Terminate the connection with the given client (asynchronous
    * detection of a protocol violation).
@@ -584,7 +584,7 @@
    * Handle a message (that was decrypted if needed).  Processes the
    * message by calling the registered handler for each message part.
    *
-   * @param wasEncrypted YES if it was encrypted, 
+   * @param wasEncrypted YES if it was encrypted,
    *                     NO if plaintext.
    * @param session for plaintext messages, the
    *  assumed transport session.  Maybe NULL.
@@ -594,7 +594,7 @@
                        unsigned int size,
                        int wasEncrypted,
                        TSession * session);
- 
+
   /**
    * Compute the index (small, positive, pseudo-unique identification
    * number) of a hostId.
@@ -635,7 +635,7 @@
  * Type of the initialization method implemented by GNUnet protocol
  * plugins.
  *
- * @param capi the core API 
+ * @param capi the core API
  */
 typedef int (*ApplicationInitMethod) (CoreAPIForApplication * capi);
 
@@ -649,7 +649,7 @@
  * Type of the initialization method implemented by GNUnet service
  * plugins.
  *
- * @param capi the core API 
+ * @param capi the core API
  */
 typedef void * (*ServiceInitMethod)(CoreAPIForApplication * capi);
 

Modified: GNUnet/src/include/gnunet_datastore_service.h
===================================================================
--- GNUnet/src/include/gnunet_datastore_service.h       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/include/gnunet_datastore_service.h       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -22,7 +22,7 @@
  * @brief API that can be used manage the
  *   datastore for files stored on a GNUnet node;
  *   note that the datastore is NOT responsible for
- *   on-demand encoding, that is achieved using 
+ *   on-demand encoding, that is achieved using
  *   a special kind of entry.
  * @author Christian Grothoff
  */
@@ -95,11 +95,11 @@
  * An iterator over a set of Datastore items.
  *
  * @param datum called with the next item
- * @param closure user-defined extra argument 
+ * @param closure user-defined extra argument
  * @return SYSERR to abort the iteration, OK to continue.
  */
 typedef int (*Datum_Iterator)(const HashCode512 * key,
-                             const Datastore_Value * value, 
+                             const Datastore_Value * value,
                              void * closure);
 
 
@@ -111,14 +111,14 @@
  * old entries and low-priority entries in the background as the
  * database fills up to its limit.  It uses a bloomfilter to avoid
  * disk-IO.  A datastore should pre-fetch some set of random entries
- * to quickly respond to getRandom(). 
+ * to quickly respond to getRandom().
  *
  * Finally, the datastore should try to detect corruption and if
  * so automatically attempt to repair itself (i.e. by keeping
  * a flag in the state-DB to indicate if the last shutdown was
  * clean, and if not, trigger a repair on startup).
  *
- * Once GNUnet has IO load management the DS should integrate with 
+ * Once GNUnet has IO load management the DS should integrate with
  * that and refuse IO if the load is too high.
  */
 typedef struct {
@@ -131,26 +131,26 @@
   /**
    * Store an item in the datastore.  If the item is
    * already present, a second copy is created.
-   *  
+   *
    * @return YES on success, NO if the datastore is
    *   full and the priority of the item is not high enough
    *   to justify removing something else, SYSERR on
    *   other serious error (i.e. IO permission denied)
    */
-  int (*put)(const HashCode512 * key, 
+  int (*put)(const HashCode512 * key,
             const Datastore_Value * value);
 
   /**
    * Store an item in the datastore.  If the item is already present,
    * the priorities are summed up and the higher expiration time and
    * lower anonymity level is used.
-   *  
+   *
    * @return YES on success, NO if the datastore is
    *   full and the priority of the item is not high enough
    *   to justify removing something else, SYSERR on
    *   other serious error (i.e. IO permission denied)
    */
-  int (*putUpdate)(const HashCode512 * key, 
+  int (*putUpdate)(const HashCode512 * key,
                   const Datastore_Value * value);
 
   /**
@@ -166,7 +166,7 @@
    *   0 if no matches were found.  May NOT return
    *   SYSERR unless the iterator aborted!
    */
-  int (*get)(const HashCode512 * key, 
+  int (*get)(const HashCode512 * key,
             unsigned int type,
             Datum_Iterator iter,
             void * closure);
@@ -183,7 +183,7 @@
    *        for any type.
    * @return OK if a value was found, SYSERR if not
    */
-  int (*getRandom)(const HashCode512 * approx, 
+  int (*getRandom)(const HashCode512 * approx,
                   unsigned int sizeLimit,
                   HashCode512 * key,
                   Datastore_Value ** value,
@@ -191,13 +191,13 @@
 
   /**
    * Delete an item from the datastore.
-   *   
+   *
    * @param value maybe NULL, then all items under the
    *         given key are deleted
    * @return the number of items deleted, 0 if
    *         none were found, SYSERR on errors
    */
-  int (*del)(const HashCode512 * key, 
+  int (*del)(const HashCode512 * key,
             const Datastore_Value * value);
 
 } Datastore_ServiceAPI;

Modified: GNUnet/src/include/gnunet_dht.h
===================================================================
--- GNUnet/src/include/gnunet_dht.h     2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/include/gnunet_dht.h     2005-03-20 23:54:53 UTC (rev 464)
@@ -27,7 +27,7 @@
  */
 
 #ifndef GNUNET_DHT_H
-#define GNUNET_DHT_H 
+#define GNUNET_DHT_H
 
 #include "gnunet_util.h"
 #include "gnunet_blockstore.h"
@@ -48,36 +48,36 @@
  * tables.  The GNUnet DHT infrastructure supports multiple
  * tables, the table to lookup peers is just one of these.
  */
-typedef HashCode512 DHT_TableId; 
+typedef HashCode512 DHT_TableId;
 
 #define equalsDHT_TableId(a,b) equalsHashCode512(a,b)
 
 /**
  * TCP communication: client to gnunetd: join table.
  * All future communications via this socket are reserved
- * for either gnunetd requesting datastore operations or 
+ * for either gnunetd requesting datastore operations or
  * the client sending a leave table message.
  */
 typedef struct {
 
   CS_HEADER header;
 
-  DHT_TableId table;  
+  DHT_TableId table;
 
 } DHT_CS_REQUEST_JOIN;
 
 /**
- * TCP communication: client to gnunetd: leave table 
+ * TCP communication: client to gnunetd: leave table
  */
 typedef struct {
 
   CS_HEADER header;
-  
-  DHT_TableId table;  
 
+  DHT_TableId table;
+
   unsigned long long timeout;  /* nbo */
 
-} DHT_CS_REQUEST_LEAVE; 
+} DHT_CS_REQUEST_LEAVE;
 
 
 /**
@@ -87,11 +87,11 @@
 typedef struct {
 
   CS_HEADER header;
-  
-  DHT_TableId table; 
 
+  DHT_TableId table;
+
   unsigned long long timeout;  /* nbo */
-  
+
   HashCode512 key;
 
   unsigned int priority; /* nbo */
@@ -110,12 +110,12 @@
 
   unsigned long long timeout;  /* nbo */
 
-  DHT_TableId table; 
+  DHT_TableId table;
 
   unsigned int priority; /* nbo */
 
   /* one or more keys */
-  HashCode512 keys;  
+  HashCode512 keys;
 
 } DHT_CS_REQUEST_GET;
 
@@ -125,9 +125,9 @@
 typedef struct {
 
   CS_HEADER header;
-  
-  DHT_TableId table; 
-  
+
+  DHT_TableId table;
+
   unsigned long long timeout; /* nbo */
 
   HashCode512 key;
@@ -141,7 +141,7 @@
 typedef struct {
 
   CS_HEADER header;
-  
+
 } DHT_CS_REQUEST_ITERATE;
 
 /**
@@ -155,7 +155,7 @@
 
   unsigned int totalResults;
 
-  DHT_TableId table; 
+  DHT_TableId table;
 
   HashCode512 key;
 
@@ -172,7 +172,7 @@
 
   int status; /* NBO */
 
-  DHT_TableId table; 
+  DHT_TableId table;
 
 } DHT_CS_REPLY_ACK;
 

Modified: GNUnet/src/include/gnunet_dht_datastore_memory.h
===================================================================
--- GNUnet/src/include/gnunet_dht_datastore_memory.h    2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/include/gnunet_dht_datastore_memory.h    2005-03-20 23:54:53 UTC 
(rev 464)
@@ -10,16 +10,16 @@
       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 GNUnet; see the file COPYING.  If not, write to the
       Free Software Foundation, Inc., 59 Temple Place - Suite 330,
       Boston, MA 02111-1307, USA.
  */
- 
+
 /**
  * @file include/gnunet_dht_datastore_memory.h
- * @brief provides the implementation of the 
+ * @brief provides the implementation of the
  * Blockstore for keeping the table data in memory.
  * @author Simo Viitanen, Christian Grothoff
  */

Modified: GNUnet/src/include/gnunet_dht_lib.h
===================================================================
--- GNUnet/src/include/gnunet_dht_lib.h 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/include/gnunet_dht_lib.h 2005-03-20 23:54:53 UTC (rev 464)
@@ -24,7 +24,7 @@
  */
 
 #ifndef GNUNET_DHT_LIB_H
-#define GNUNET_DHT_LIB_H 
+#define GNUNET_DHT_LIB_H
 
 #include "gnunet_blockstore.h"
 #include "gnunet_dht_service.h"
@@ -46,9 +46,9 @@
  *
  * @param datastore the storage callbacks to use for the table
  * @param table the ID of the table
- * @param timeout how long to wait for other peers to respond to 
+ * @param timeout how long to wait for other peers to respond to
  *   the join request (has no impact on success or failure)
- * @param flags 
+ * @param flags
  * @return SYSERR on error, OK on success
  */
 int DHT_LIB_join(Blockstore * store,
@@ -61,7 +61,7 @@
  *
  * @param datastore the storage callbacks to use for the table
  * @param table the ID of the table
- * @param timeout how long to wait for other peers to respond to 
+ * @param timeout how long to wait for other peers to respond to
  *   the leave request (has no impact on success or failure);
  *   but only timeout time is available for migrating data, so
  *   pick this value with caution.
@@ -70,7 +70,7 @@
  * @return SYSERR on error, OK on success
  */
 int DHT_LIB_leave(DHT_TableId * table,
-                 cron_t timeout); 
+                 cron_t timeout);
 
 
 /**
@@ -85,7 +85,7 @@
  * The peer does not have to be part of the table!
  *
  * @param table table to use for the lookup
- * @param keys the keys to look up  
+ * @param keys the keys to look up
  * @param timeout how long to wait until this operation should
  *        automatically time-out
  * @param resultCallback function to call for results

Modified: GNUnet/src/include/gnunet_dht_service.h
===================================================================
--- GNUnet/src/include/gnunet_dht_service.h     2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_dht_service.h     2005-03-20 23:54:53 UTC (rev 
464)
@@ -58,20 +58,20 @@
    *
    * @param datastore the storage callbacks to use for the table
    * @param table the ID of the table
-   * @param timeout how long to wait for other peers to respond to 
+   * @param timeout how long to wait for other peers to respond to
    *   the join request (has no impact on success or failure)
    * @return SYSERR on error, OK on success
    */
   int (*join)(Blockstore * datastore,
              const DHT_TableId * table);
-  
+
   /**
    * Leave a table (stop storing data for the table).  Leave
    * fails if the node is not joint with the table.
    *
    * @param datastore the storage callbacks to use for the table
    * @param table the ID of the table
-   * @param timeout how long to wait for other peers to respond to 
+   * @param timeout how long to wait for other peers to respond to
    *   the leave request (has no impact on success or failure);
    *   but only timeout time is available for migrating data, so
    *   pick this value with caution.
@@ -79,7 +79,7 @@
    * @return SYSERR on error, OK on success
    */
   int (*leave)(const DHT_TableId * table,
-              cron_t timeout); 
+              cron_t timeout);
 
 
   /**
@@ -88,7 +88,7 @@
    * of the table (if so, we will attempt to locate a peer that is!)
    *
    * @param table table to use for the lookup
-   * @param key the key to look up  
+   * @param key the key to look up
    * @param timeout how long to wait until this operation should
    *        automatically time-out
    * @param callback function to call on each result
@@ -117,7 +117,7 @@
    * peer that is!)
    *
    * @param table table to use for the lookup
-   * @param key the key to look up  
+   * @param key the key to look up
    * @param timeout how long to wait until this operation should
    *        automatically time-out
    * @param callback function to call on successful completion
@@ -130,7 +130,7 @@
                                       const DataContainer * value,
                                       DHT_OP_Complete callback,
                                       void * closure);
-  
+
   /**
    * Stop async DHT-put.  Frees associated resources.
    */
@@ -143,7 +143,7 @@
    * peer that is!)
    *
    * @param table table to use for the lookup
-   * @param key the key to look up  
+   * @param key the key to look up
    * @param timeout how long to wait until this operation should
    *        automatically time-out
    * @param callback function to call on successful completion
@@ -155,13 +155,13 @@
                                             cron_t timeout,
                                             const DataContainer * value,
                                             DHT_OP_Complete callback,
-                                            void * closure); 
-    
+                                            void * closure);
+
   /**
    * Stop async DHT-remove.  Frees associated resources.
    */
   int (*remove_stop)(struct DHT_REMOVE_RECORD * record);
-  
+
 } DHT_ServiceAPI;
 
 #endif /* DHT_SERVICE_API_H */

Modified: GNUnet/src/include/gnunet_ecrs_lib.h
===================================================================
--- GNUnet/src/include/gnunet_ecrs_lib.h        2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_ecrs_lib.h        2005-03-20 23:54:53 UTC (rev 
464)
@@ -19,7 +19,7 @@
 
 /**
  * @file include/gnunet_ecrs_lib.h
- * @brief support for ECRS encoding of files 
+ * @brief support for ECRS encoding of files
  * @author Christian Grothoff
  */
 
@@ -58,11 +58,11 @@
 
 
 /**
- * Fixed SBlock updateInterval codes. Positive values 
- * are interpreted as durations (in seconds) for periodical 
+ * Fixed SBlock updateInterval codes. Positive values
+ * are interpreted as durations (in seconds) for periodical
  * updates.
  */
-#define ECRS_SBLOCK_UPDATE_SPORADIC  -1 
+#define ECRS_SBLOCK_UPDATE_SPORADIC  -1
 #define ECRS_SBLOCK_UPDATE_NONE       0
 
 
@@ -122,7 +122,7 @@
 /**
  * Iterate over MD entries, excluding thumbnails.
  *
- * @return number of entries 
+ * @return number of entries
  */
 int ECRS_getMetaData(const struct ECRS_MetaData * md,
                     ECRS_MetaDataIterator iterator,
@@ -145,10 +145,10 @@
  */
 size_t ECRS_getThumbnailFromMetaData(const struct ECRS_MetaData * md,
                                     unsigned char ** thumb);
-                  
+               
 /**
- * Extract meta-data from a file.  
- * 
+ * Extract meta-data from a file.
+ *
  * @return SYSERR on error, otherwise the number
  *   of meta-data items obtained
  */
@@ -160,10 +160,10 @@
  * Serialize meta-data to target.
  *
  * @param size maximum number of bytes available
- * @param part is it ok to just write SOME of the 
+ * @param part is it ok to just write SOME of the
  *        meta-data to match the size constraint,
  *        possibly discarding some data? YES/NO.
- * @return number of bytes written on success, 
+ * @return number of bytes written on success,
  *         SYSERR on error (typically: not enough
  *         space)
  */
@@ -181,7 +181,7 @@
 /**
  * Deserialize meta-data.  Initializes md.
  * @param size number of bytes available
- * @return OK on success, SYSERR on error (i.e. 
+ * @return OK on success, SYSERR on error (i.e.
  *         bad format)
  */
 int ECRS_deserializeMetaData(struct ECRS_MetaData ** md,
@@ -194,7 +194,7 @@
  *
  * @return YES if it is, NO if it is not, SYSERR if
  *  we have no mime-type information (treat as 'NO')
- */ 
+ */
 int ECRS_isDirectory(struct ECRS_MetaData * md);
 
 /**
@@ -258,7 +258,7 @@
 char * ECRS_getNamespaceName(const HashCode512 * nsid);
 
 /**
- * Get the ID of a namespace from the given 
+ * Get the ID of a namespace from the given
  * namespace URI.
  */
 int ECRS_getNamespaceId(const struct ECRS_URI * uri,
@@ -368,11 +368,11 @@
                                 void * cls);
 
 /**
- * Iterate over all indexed files.  
+ * Iterate over all indexed files.
  *
  * This function will ONLY work if gnunetd runs on the
  * same machine as the current process and if the indexed
- * files could be symlinked.  If indexed files had to be 
+ * files could be symlinked.  If indexed files had to be
  * uploaded to a remote machine or copied, the original
  * names will have been lost.  In that case, the iterator
  * will NOT iterate over these files.
@@ -409,7 +409,7 @@
  * @param meta meta-data for the namespace advertisement
  * @param rootEntry name of the root entry in the namespace (for
  *        the namespace advertisement)
- * @param rootURI set to the URI of the namespace, NULL if 
+ * @param rootURI set to the URI of the namespace, NULL if
  *        no advertisement was created
  *
  * @return OK on success, SYSERR on error (namespace already exists)
@@ -507,7 +507,7 @@
  * @param key under which the result was found (hash of keyword),
  *        NULL if no key is known
  * @param md a description for the URI
- * @return OK, SYSERR to abort 
+ * @return OK, SYSERR to abort
  */
 typedef int (*ECRS_SearchProgressCallback)
   (const ECRS_FileInfo * fi,
@@ -551,10 +551,10 @@
    unsigned long long lastBlockOffset,
    const char * lastBlock,
    unsigned int lastBlockSize,
-   void * closure); 
+   void * closure);
 
 /**
- * Download a file. 
+ * Download a file.
  *
  * @param uri the URI of the file (determines what to download)
  * @param filename where to store the file

Modified: GNUnet/src/include/gnunet_fs_lib.h
===================================================================
--- GNUnet/src/include/gnunet_fs_lib.h  2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/include/gnunet_fs_lib.h  2005-03-20 23:54:53 UTC (rev 464)
@@ -45,7 +45,7 @@
  * Search for blocks matching the given key and type.
  *
  * @param timeout how long to search
- * @param anonymityLevel what are the anonymity 
+ * @param anonymityLevel what are the anonymity
  *        requirements for this request? 0 for no
  *        anonymity (DHT/direct transfer ok)
  * @param callback method to call for each result
@@ -77,7 +77,7 @@
  * Insert a block.  Note that while the API is VERY similar to
  * FS_index in terms of signature, the block for FS_index must be in
  * plaintext, whereas the block passed to FS_insert must be encrypted!
- * 
+ *
  * @param block the block (properly encoded and all)
  * @return OK on success, SYSERR on error
  * @see ecrs_core.h::fileBlockEncode
@@ -97,23 +97,23 @@
  * Index a block.  Note that while the API is VERY similar to
  * FS_insert in terms of signature, the block for FS_index must be in
  * plaintext, whereas the block passed to FS_insert must be encrypted!
- * 
+ *
  * @param fileHc the hash of the entire file
  * @param block the data from the file (in plaintext)
  * @param offset the offset of the block into the file
  * @return OK on success, SYSERR on error
  */
 int FS_index(GNUNET_TCP_SOCKET * sock,
-            const HashCode512 * fileHc,          
+            const HashCode512 * fileHc,        
             const Datastore_Value * block,
             unsigned long long offset);
 
 /**
  * Delete a block.  The arguments are the same as the ones for
  * FS_insert.
- * 
+ *
  * @param block the block (properly encoded and all)
- * @return number of items deleted on success, 
+ * @return number of items deleted on success,
  *    SYSERR on error
  */
 int FS_delete(GNUNET_TCP_SOCKET * sock,
@@ -121,7 +121,7 @@
 
 /**
  * Unindex a file.
- * 
+ *
  * @param hc the hash of the entire file
  * @return OK on success, SYSERR on error
  */
@@ -131,7 +131,7 @@
 
 /**
  * Test if a file of the given hash is indexed.
- * 
+ *
  * @param hc the hash of the entire file
  * @return YES if so, NO if not, SYSERR on error
  */

Modified: GNUnet/src/include/gnunet_fsui_lib.h
===================================================================
--- GNUnet/src/include/gnunet_fsui_lib.h        2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_fsui_lib.h        2005-03-20 23:54:53 UTC (rev 
464)
@@ -52,8 +52,8 @@
  * interrupted (such as indexing / unindexing operations). If this
  * is not acceptable, clients should wait until all uploads and
  * unindexing operations have completed before attempting to close
- * the FSUI_Context.<p> 
- * 
+ * the FSUI_Context.<p>
+ *
  * Note that most of this code is completely new in GNUnet 0.7.0 and
  * thus still highly experimental.  Suggestions are welcome.
  */
@@ -67,7 +67,7 @@
 /**
  * @brief types of FSUI events.
  */
-enum FSUI_EventType { 
+enum FSUI_EventType {
   /**
    * We found a new search result.
    */
@@ -198,7 +198,7 @@
       /**
        * Start time.
        */
-      cron_t start_time;   
+      cron_t start_time;
       /**
        * Is this (part of) a recursive upload?
        */
@@ -230,7 +230,7 @@
       /**
        * Start time.
        */
-      cron_t start_time;   
+      cron_t start_time;
       /**
        * Is this (part of) a recursive upload?
        */
@@ -239,7 +239,7 @@
        * If the download is recursive, what is the
        * main file? (otherwise equal to filename);
        */
-      char * main_filename;      
+      char * main_filename;
     } UploadComplete;
     struct {
       /* FIXME */
@@ -251,7 +251,7 @@
      * Used for errors.
      */
     char * message;
-  } data;  
+  } data;
 } FSUI_Event;
 
 /**
@@ -312,7 +312,7 @@
                                   const HashCode512 * lastId,
                                   const HashCode512 * nextId,
                                   cron_t publicationFrequency,
-                                  cron_t nextPublicationTime); 
+                                  cron_t nextPublicationTime);
 
 /**
  * Iterator over active downloads.
@@ -343,7 +343,7 @@
  * <p>
  *
  * Note that suspend/resume is not implemented in this version of
- * GNUnet.  
+ * GNUnet.
  *
  * @param name name of the tool or set of tools; used to
  *          resume activities; tools that use the same name here
@@ -525,7 +525,7 @@
 int FSUI_stopDownloadAll(struct FSUI_Context * ctx,
                         const struct ECRS_URI * uri,
                         const char * dirname); /* download.c */
-                   
+               
 /* ******************** collections API **************** */
 
 /**
@@ -558,7 +558,7 @@
  * collecting, this function does nothing.
  *
  * Note that clients typically don't have to call this
- * function explicitly.  FSUI will call the function on 
+ * function explicitly.  FSUI will call the function on
  * exit (for sporadically updated collections), on any
  * change to the collection (for immediately updated
  * content) or when the publication time has arrived
@@ -628,7 +628,7 @@
  * Add a namespace to the set of known namespaces.
  * For all namespace advertisements that we discover
  * FSUI should automatically call this function.
- * 
+ *
  * @param ns the namespace identifier
  */
 void FSUI_addNamespaceInfo(const struct ECRS_URI * uri,
@@ -636,7 +636,7 @@
 
 /**
  * List all available (local or non-local) namespaces.
- * 
+ *
  * @param local only list local namespaces (if NO, only
  *   non-local known namespaces are listed)
  */
@@ -653,10 +653,10 @@
  *      or NULL if user wants system to pick random value;
  *      nextId and lastId NULL (irrelevant)</li>
  *  <li>updateInterval SPORADIC, thisId given (initial
- *      submission), nextId maybe given or NULL, 
+ *      submission), nextId maybe given or NULL,
  *      lastId NULL</li>
  *  <li>updateInterval SPORADIC, lastId given (either
- *      user-provided or from listNamespaceContent 
+ *      user-provided or from listNamespaceContent
  *      iterator); thisId NULL or given (from lNC);
  *      nextId maybe given or NULL, depending on user preference</li>
  *  <li>updateInterval non-NULL, non-SPORADIC; lastId
@@ -666,7 +666,7 @@
  *  <li>updateInterval non-NULL, non-SPORADIC; lastId
  *      is non-NULL (periodic update), thisId NULL (computed!)
  *      nextID NULL (computed)</li>
- * </ul> 
+ * </ul>
  * And yes, reading the ECRS paper maybe a good idea.
  *
  * @param name in which namespace to publish
@@ -711,7 +711,7 @@
  * @param onOff YES to enable tracking, NO to disable
  *  disabling tracking also deletes all entries in the
  *  cache.
- */ 
+ */
 void FSUI_trackURIS(int onOff); /* file_info.c */
 
 
@@ -719,7 +719,7 @@
  * Get the FSUI URI tracking status.
  *
  * @return YES of tracking is enabled, NO if not
- */ 
+ */
 int FSUI_trackStatus(); /* file_info.c */
 
 /**
@@ -729,7 +729,7 @@
  * call ECRS directly.
  */
 void FSUI_trackURI(const ECRS_FileInfo * fi); /* file_info.c */
- 
+
 /**
  * List all URIs.
  */

Modified: GNUnet/src/include/gnunet_gap_service.h
===================================================================
--- GNUnet/src/include/gnunet_gap_service.h     2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_gap_service.h     2005-03-20 23:54:53 UTC (rev 
464)
@@ -49,14 +49,14 @@
 typedef struct {
 
   /**
-   * Start GAP.  
+   * Start GAP.
    *
    * @param datastore the storage callbacks to use for storing data
    * @return SYSERR on error, OK on success
    */
   int (*init)(Blockstore * datastore,
              UniqueReplyIdentifier uri);
-  
+
   /**
    * Perform a GET operation using 'key' as the key.  Note that no
    * callback is given for the results since GAP just calls PUT on the
@@ -105,7 +105,7 @@
    * are currently routing?
    */
   unsigned int (*getAvgPriority)();
-    
+
 } GAP_ServiceAPI;
 
 #endif /* GAP_SERVICE_API_H */

Modified: GNUnet/src/include/gnunet_getoption_lib.h
===================================================================
--- GNUnet/src/include/gnunet_getoption_lib.h   2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_getoption_lib.h   2005-03-20 23:54:53 UTC (rev 
464)
@@ -31,7 +31,7 @@
 /**
  * Obtain option value from a peer.
  * @return NULL on error
- */   
+ */
 char * getConfigurationOptionValue(GNUNET_TCP_SOCKET * sock,
                                   const char * section,
                                   const char * option);

Modified: GNUnet/src/include/gnunet_gnunetd_lib.h
===================================================================
--- GNUnet/src/include/gnunet_gnunetd_lib.h     2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_gnunetd_lib.h     2005-03-20 23:54:53 UTC (rev 
464)
@@ -27,7 +27,7 @@
 #define GNUNET_GNUNETD_LIB_H
 
 /**
- * Is gnunetd running?  
+ * Is gnunetd running?
  * @return YES if gnunetd is running, NO if not
  */
 int GNUNETD_checkRunning();

Modified: GNUnet/src/include/gnunet_identity_service.h
===================================================================
--- GNUnet/src/include/gnunet_identity_service.h        2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/include/gnunet_identity_service.h        2005-03-20 23:54:53 UTC 
(rev 464)
@@ -20,11 +20,11 @@
  * @file include/gnunet_identity_service.h
  * @brief Code to maintain the list of currently known hosts
  *   (in memory structure of data/hosts), their credit ratings
- *   (in memory structure of data/trust), and temporary 
+ *   (in memory structure of data/trust), and temporary
  *   blacklisting information (misbehavior, failed connection
  *   attempts)
  * @author Christian Grothoff
- */ 
+ */
 
 #ifndef GNUNET_IDENTITY_SERVICE_H
 #define GNUNET_IDENTITY_SERVICE_H
@@ -48,7 +48,7 @@
  *        if NO the host is in the temporary list
  * @param data callback closure
  */
-typedef void (*HostIterator)(const PeerIdentity * identity, 
+typedef void (*HostIterator)(const PeerIdentity * identity,
                             unsigned short protocol,
                             int confirmed,
                             void * data);
@@ -57,7 +57,7 @@
  * @brief Definition of the Identity API.
  */
 typedef struct {
-  
+
   /**
    * Get the public key of this peer.
    *
@@ -73,9 +73,9 @@
    */
   void (*getPeerIdentity)(const PublicKey * pubKey,
                          PeerIdentity * result);
-  
-  
-  /** 
+
+
+  /**
    * Sign arbitrary data. ALWAYS use only on data we entirely generated.
    * @param data what to sign
    * @param size how big is the data
@@ -87,7 +87,7 @@
                  Signature * result);
 
   /**
-   * Decrypt a given block with the hostkey. 
+   * Decrypt a given block with the hostkey.
    * @param block the data to decrypt, encoded as returned by encrypt, not 
consumed
    * @param result pointer to a location where the result can be stored
    * @param max the maximum number of bits to store for the result, if
@@ -103,7 +103,7 @@
    */
   void (*delHostFromKnown)(const PeerIdentity * identity,
                           unsigned short protocol);
-  
+
   /**
    * Add a host to the temporary list.
    */
@@ -118,15 +118,15 @@
   /**
    * Call a method for each known host.
    * @param callback the method to call for each host, may be NULL
-   * @param now the time to use for excluding hosts due to blacklisting, use 0 
+   * @param now the time to use for excluding hosts due to blacklisting, use 0
    *        to go through all hosts.
    * @param data an argument to pass to the method
    * @return the number of known hosts matching
    */
   int (*forEachHost)(cron_t now,
-                    HostIterator callback,                  
+                    HostIterator callback,             
                     void * data);
-  
+
   /**
    * Obtain the public key and address of a known host. If no specific
    * protocol is specified (ANY_PROTOCOL_NUMBER), the HELO for the
@@ -145,7 +145,7 @@
 
   /**
    *
-   * 
+   *
    * @param signer the identity of the host that presumably signed the message
    * @param message the signed message
    * @param size the size of the message
@@ -172,7 +172,7 @@
 
   /**
    * Is the node currently 'strictly' blacklisted, that is, the node
-   * misbehaved badly and we also reject inbound connections.  
+   * misbehaved badly and we also reject inbound connections.
    *
    * @param identity node to check
    * @return YES if true, else NO
@@ -195,7 +195,7 @@
    * @param value is the int value by which the host credit is to be increased
    * @returns the new credit
    */
-  int (*changeHostTrust)(const PeerIdentity * hostId, 
+  int (*changeHostTrust)(const PeerIdentity * hostId,
                         int value);
 
   /**

Modified: GNUnet/src/include/gnunet_protocols.h
===================================================================
--- GNUnet/src/include/gnunet_protocols.h       2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_protocols.h       2005-03-20 23:54:53 UTC (rev 
464)
@@ -43,7 +43,7 @@
  * _internally_ to GNUnet which protocol from the TCP/IP suite to use
  * to run GNUnet over.
  */
-   
+
 /**
  * protocol number for "unspecified"
  */
@@ -56,7 +56,7 @@
 #define NAT_PROTOCOL_NUMBER 1
 
 /**
- * protocol number of TCP. Do NEVER change, also used in other context! 
+ * protocol number of TCP. Do NEVER change, also used in other context!
  */
 #define TCP_PROTOCOL_NUMBER 6
 
@@ -71,7 +71,7 @@
 #define TCP6_PROTOCOL_NUMBER 12
 
 /**
- * protocol number of UDP. Do NEVER change, also used in other context! 
+ * protocol number of UDP. Do NEVER change, also used in other context!
  */
 #define UDP_PROTOCOL_NUMBER 17
 
@@ -81,7 +81,7 @@
 #define UDP6_PROTOCOL_NUMBER 23
 
 /**
- * protocol number for SMTP 
+ * protocol number for SMTP
  */
 #define SMTP_PROTOCOL_NUMBER 25
 
@@ -95,12 +95,12 @@
  */
 #define CS_PROTO_RETURN_VALUE 0
 
-/** 
+/**
  * client to gnunetd: shutdown
  */
 #define CS_PROTO_SHUTDOWN_REQUEST 1
 
-/** 
+/**
  * client to gnunetd: get configuration option
  */
 #define CS_PROTO_GET_OPTION_REQUEST 2
@@ -129,7 +129,7 @@
 #define AFS_CS_PROTO_RESULT 9
 
 /**
- * client to gnunetd: insert CHK content (no index) 
+ * client to gnunetd: insert CHK content (no index)
  */
 #define AFS_CS_PROTO_INSERT 10
 
@@ -139,7 +139,7 @@
 #define AFS_CS_PROTO_INDEX 11
 
 /**
- * client to gnunetd: delete content 
+ * client to gnunetd: delete content
  */
 #define AFS_CS_PROTO_DELETE 12
 
@@ -167,8 +167,8 @@
 /* *********** messages for traffic module ************* */
 
 /**
- * client to traffic module: to how many nodes are we connected? 
- * reply is a CS_RETURN_VALUE message. 
+ * client to traffic module: to how many nodes are we connected?
+ * reply is a CS_RETURN_VALUE message.
  */
 #define CS_PROTO_CLIENT_COUNT 32
 
@@ -178,7 +178,7 @@
 #define CS_PROTO_TRAFFIC_QUERY 33
 
 /**
- * traffic module to client: traffic statistics 
+ * traffic module to client: traffic statistics
  */
 #define CS_PROTO_TRAFFIC_INFO 34
 
@@ -186,12 +186,12 @@
 /* *********** messages for stats module ************* */
 
 /**
- * client to stats module: request statistics 
+ * client to stats module: request statistics
  */
 #define STATS_CS_PROTO_GET_STATISTICS 36
 
 /**
- * stats module to client: statistics 
+ * stats module to client: statistics
  */
 #define STATS_CS_PROTO_STATISTICS 37
 
@@ -230,31 +230,31 @@
 
 
 /* ********** CS DHT application messages ********** */
-                                        
+
 /**
- * client to CS: join table        
+ * client to CS: join table
  */
 #define DHT_CS_PROTO_REQUEST_JOIN     72
 
 /**
- * client to CS: leave table       
+ * client to CS: leave table
  */
 #define DHT_CS_PROTO_REQUEST_LEAVE    73
 
 /**
- * Client to CS or CS to client: get from table   
+ * Client to CS or CS to client: get from table
  */
 #define DHT_CS_PROTO_REQUEST_GET      74
 
 /**
- * Client to CS or CS to client: put into table    
+ * Client to CS or CS to client: put into table
  */
-#define DHT_CS_PROTO_REQUEST_PUT      75 
+#define DHT_CS_PROTO_REQUEST_PUT      75
 
 /**
  * Client to CS or CS to client: remove from table
  */
-#define DHT_CS_PROTO_REQUEST_REMOVE   76 
+#define DHT_CS_PROTO_REQUEST_REMOVE   76
 
 /**
  * Client to CS or CS to client: results from get
@@ -279,28 +279,28 @@
 /* ********* p2p infrastructure messages *********** */
 
 /**
- * announcement of public key 
+ * announcement of public key
  */
 #define p2p_PROTO_HELO 0
 
 /**
- * session key exchange, session key is encrypted with hostkey 
+ * session key exchange, session key is encrypted with hostkey
  */
 #define p2p_PROTO_SKEY 1
 
 /**
- * PING 
+ * PING
  */
 #define p2p_PROTO_PING 2
 
 /**
- * PONG (response to PING) 
+ * PONG (response to PING)
  */
 #define p2p_PROTO_PONG 3
 
 /**
  * termination of connection (other host is nice
- * and tells us, there is NO requirement to do so!) 
+ * and tells us, there is NO requirement to do so!)
  */
 #define p2p_PROTO_HANGUP 4
 
@@ -317,19 +317,19 @@
 /* ************* p2p GAP application messages *********** */
 
 /**
- * Query for content. 
+ * Query for content.
  */
 #define GAP_p2p_PROTO_QUERY 16
 
 /**
- * receive content 
+ * receive content
  */
 #define GAP_p2p_PROTO_RESULT 17
 
 /* ************** p2p CHAT application messages *********** */
 
 /**
- * chat message 
+ * chat message
  */
 #define CHAT_p2p_PROTO_MSG 32
 
@@ -342,7 +342,7 @@
 /* ********** p2p TBENCH application messages ********** */
 
 /**
- * benchmark message: send back reply asap 
+ * benchmark message: send back reply asap
  */
 #define TBENCH_p2p_PROTO_REQUEST 40
 #define TBENCH_p2p_PROTO_REPLY          41
@@ -361,7 +361,7 @@
 
 /**
  * Reserved number for "any type".
- */ 
+ */
 #define ANY_BLOCK 0
 
 /**

Modified: GNUnet/src/include/gnunet_rpc_service.h
===================================================================
--- GNUnet/src/include/gnunet_rpc_service.h     2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_rpc_service.h     2005-03-20 23:54:53 UTC (rev 
464)
@@ -107,13 +107,13 @@
 
 /**
  * The RPC service API.
- */ 
+ */
 typedef struct {
 
   /**
    * Perform a synchronous RPC.
    */
-  int (*RPC_execute)(const PeerIdentity * receiver, 
+  int (*RPC_execute)(const PeerIdentity * receiver,
                     const char * name,
                     RPC_Param * request_param,
                     RPC_Param * return_param,
@@ -125,7 +125,7 @@
    */
   int (*RPC_register)(const char * name,
                      RPC_Function func);
-  
+
   /**
    * Unregister a synchronous RPC function.
    */
@@ -162,7 +162,7 @@
                                   cron_t timeout,
                                   RPC_Complete callback,
                                   void * closure);
- 
+
   /**
    * Stop an asynchronous RPC.
    *
@@ -185,13 +185,13 @@
 
 unsigned int RPC_paramCount(RPC_Param *param);
 
-void RPC_paramAdd(RPC_Param * param, 
-                 const char * name, 
-                 unsigned int dataLength, 
+void RPC_paramAdd(RPC_Param * param,
+                 const char * name,
+                 unsigned int dataLength,
                  const void * data);
 
-void RPC_paramAddDataContainer(RPC_Param * param, 
-                              const char * name, 
+void RPC_paramAddDataContainer(RPC_Param * param,
+                              const char * name,
                               const DataContainer * data);
 
 const char * RPC_paramName(RPC_Param * param,
@@ -203,7 +203,7 @@
 /**
  * @return OK on success, SYSERR on error
  */
-int RPC_paramValueByName(RPC_Param * param, 
+int RPC_paramValueByName(RPC_Param * param,
                         const char * name,
                         unsigned int * dataLength,
                         void ** data);
@@ -211,7 +211,7 @@
 /**
  * @return OK on success, SYSERR on error
  */
-int RPC_paramValueByPosition(RPC_Param * param, 
+int RPC_paramValueByPosition(RPC_Param * param,
                             unsigned int i,
                             unsigned int * dataLength,
                             void ** data);
@@ -223,7 +223,7 @@
  * @param value set to the value of the parameter
  */
 DataContainer *
-RPC_paramDataContainerByPosition(RPC_Param *param, 
+RPC_paramDataContainerByPosition(RPC_Param *param,
                                 unsigned int i);
 
 /**
@@ -253,7 +253,7 @@
 /**
  * How many bytes are required to serialize the param array?
  */
-size_t RPC_paramSize(RPC_Param * param); 
+size_t RPC_paramSize(RPC_Param * param);
 
 
 #endif /* GNUNET_RPC_SERVICE_H */

Modified: GNUnet/src/include/gnunet_session_service.h
===================================================================
--- GNUnet/src/include/gnunet_session_service.h 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_session_service.h 2005-03-20 23:54:53 UTC (rev 
464)
@@ -21,7 +21,7 @@
  * @brief Code that maintains the GNUnet session.
  *  It is responsible for establishing connections.
  * @author Christian Grothoff
- */ 
+ */
 
 #ifndef GNUNET_SESSION_SERVICE_H
 #define GNUNET_SESSION_SERVICE_H
@@ -39,12 +39,12 @@
   /**
    * Try to connect to the given peer.
    *
-   * @return SYSERR if that is impossible, 
+   * @return SYSERR if that is impossible,
    *         YES if a connection is established upon return,
    *         NO if we're going to try to establish one asynchronously
    */
   int (*tryConnect)(const PeerIdentity * peer);
-   
+
 } Session_ServiceAPI;
 
 #endif

Modified: GNUnet/src/include/gnunet_sqstore_service.h
===================================================================
--- GNUnet/src/include/gnunet_sqstore_service.h 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_sqstore_service.h 2005-03-20 23:54:53 UTC (rev 
464)
@@ -23,7 +23,7 @@
  *   additional indices that allow traversing the store in
  *   order of expiration time or priority, in addition to
  *   queries by key and block type.  The name comes from SQL,
- *   because using an SQL database to do this should be 
+ *   because using an SQL database to do this should be
  *   particularly easy.  But that is of course not the only
  *   way to implement an sqstore.
  * @author Christian Grothoff
@@ -50,10 +50,10 @@
 
   /**
    * Store an item in the datastore.
-   *  
+   *
    * @return OK on success, SYSERR on error
    */
-  int (*put)(const HashCode512 * key, 
+  int (*put)(const HashCode512 * key,
             const Datastore_Value * value);
 
   /**
@@ -67,7 +67,7 @@
    * @return the number of results, SYSERR if the
    *   iter is non-NULL and aborted the iteration
    */
-  int (*get)(const HashCode512 * key, 
+  int (*get)(const HashCode512 * key,
             unsigned int type,
             Datum_Iterator iter,
             void * closure);
@@ -83,7 +83,7 @@
    * Note that it is possible for multiple values to match this put.
    * In that case, all of the respective values are updated.
    *
-   * @param key never NULL 
+   * @param key never NULL
    * @param value the value to update (priority
    *     maybe different than in DB, only match
    *     on content and use other data as in DB!)
@@ -94,7 +94,7 @@
    * @return OK if a match was found and the update
    *     was successful, SYSERR on error
    */
-  int (*update)(const HashCode512 * key, 
+  int (*update)(const HashCode512 * key,
                const Datastore_Value * value,
                int delta);
 
@@ -137,7 +137,7 @@
    * contain the same data, the data has multiple replicas and all are
    * kept, avoiding unavaialbility if just one of the files is
    * removed).
-   *   
+   *
    * @param value maybe NULL, then all items under the
    *        given key are deleted
    * @return the number of items deleted (if possible, the
@@ -150,7 +150,7 @@
    *        also be rare).
    *        0 if no matching items were found, SYSERR on errors
    */
-  int (*del)(const HashCode512 * key, 
+  int (*del)(const HashCode512 * key,
             const Datastore_Value * value);
 
   /**

Modified: GNUnet/src/include/gnunet_stats_lib.h
===================================================================
--- GNUnet/src/include/gnunet_stats_lib.h       2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_stats_lib.h       2005-03-20 23:54:53 UTC (rev 
464)
@@ -51,7 +51,7 @@
 
 /**
  * Request statistics from TCP socket.
- * @param sock the socket to use 
+ * @param sock the socket to use
  * @param processor function to call on each value
  * @return OK on success, SYSERR on error
  */
@@ -70,7 +70,7 @@
 
 /**
  * Request available protocols from TCP socket.
- * @param sock the socket to use 
+ * @param sock the socket to use
  * @param processor function to call on each value
  * @return OK on success, SYSERR on error
  */

Modified: GNUnet/src/include/gnunet_stats_service.h
===================================================================
--- GNUnet/src/include/gnunet_stats_service.h   2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_stats_service.h   2005-03-20 23:54:53 UTC (rev 
464)
@@ -41,7 +41,7 @@
 
   /**
    * Manipulate statistics.  Sets the core-statistics associated with
-   * the handle to value.  
+   * the handle to value.
    *
    * @param handle the handle for the value to change
    * @param value to what the value should be set

Modified: GNUnet/src/include/gnunet_topology_service.h
===================================================================
--- GNUnet/src/include/gnunet_topology_service.h        2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/include/gnunet_topology_service.h        2005-03-20 23:54:53 UTC 
(rev 464)
@@ -21,7 +21,7 @@
  * @brief Code that maintains the GNUnet topology.
  *  It is responsible for establishing connections.
  * @author Christian Grothoff
- */ 
+ */
 
 #ifndef GNUNET_TOPOLOGY_SERVICE_H
 #define GNUNET_TOPOLOGY_SERVICE_H

Modified: GNUnet/src/include/gnunet_traffic_service.h
===================================================================
--- GNUnet/src/include/gnunet_traffic_service.h 2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_traffic_service.h 2005-03-20 23:54:53 UTC (rev 
464)
@@ -20,7 +20,7 @@
 /**
  * @file include/gnunet_traffic_service.h
  * @author Christian Grothoff
- * 
+ *
  * @brief Module to keep track of recent amounts of p2p traffic
  * on the local GNUnet node.
  */
@@ -51,7 +51,7 @@
  * What is the unit of time (in cron_t) for the traffic module? This
  * constant essentially specifies the resolution of the distribution
  * function that is applied for sampling traffic. Default is 1s.
- */ 
+ */
 #define TRAFFIC_TIME_UNIT cronSECONDS
 
 /**

Modified: GNUnet/src/include/gnunet_transport.h
===================================================================
--- GNUnet/src/include/gnunet_transport.h       2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/include/gnunet_transport.h       2005-03-20 23:54:53 UTC (rev 
464)
@@ -31,11 +31,11 @@
 
 /**
  * Just the version number of GNUnet-transport implementation.
- * Encoded as 
+ * Encoded as
  * 0.6.1d  => 0x00060100
  * 4.5.2   => 0x04050200
- * 
- * Note that this version number is only changed if 
+ *
+ * Note that this version number is only changed if
  * something changes in the transport API.  It follows
  * roughly the main GNUnet version scheme, but is
  * more a compatibility ID.
@@ -84,7 +84,7 @@
  * This header file contains a draft for the gnunetd
  * core API. This API is used by the transport layer
  * for communication with the GNUnet core.
- * 
+ *
  * A pointer to an instance of this struct is passed
  * to the init method of each Transport API.
  */
@@ -162,7 +162,7 @@
   /**
    * The name of the transport, set by the
    * core. Read only for the service itself!
-   */ 
+   */
   char * transName;
 
   /**
@@ -204,13 +204,13 @@
    * @return OK if the helo is well-formed
    */
   int (*verifyHelo)(const HELO_Message * helo);
-  
+
   /**
    * Create a HELO-Message for the current node. The HELO is
    * created without signature, timestamp, senderIdentity
-   * or publicKey. The GNUnet core will sign the message 
+   * or publicKey. The GNUnet core will sign the message
    * and add these other fields. The callee is only
-   * responsible for filling in the protocol number, 
+   * responsible for filling in the protocol number,
    * senderAddressSize and the senderAddress itself.
    *
    * @param helo address where to store the pointer to the HELO
@@ -246,7 +246,7 @@
              const unsigned int size);
 
   /**
-   * Send a message to the specified remote node with 
+   * Send a message to the specified remote node with
    * increased reliablility (whatever that means is
    * up to the transport).
    *
@@ -275,7 +275,7 @@
    * for eventually freeing resources associated with the tesession). If
    * session is not NULL, the core takes responsbility for eventually
    * calling disconnect.
-   * 
+   *
    * @param tsession the session handle passed along
    *   from the call to receive that was made by the transport
    *   layer
@@ -289,7 +289,7 @@
    * by either the transport layer calling "closeSession" on
    * the core API or by the core API calling "disconnect"
    * on the transport API. Neither closeSession nor
-   * disconnect should call the other method. Due to 
+   * disconnect should call the other method. Due to
    * potentially concurrent actions (both sides close the
    * connection simultaneously), either API must tolerate
    * being called from the other side.
@@ -297,7 +297,7 @@
    * @param tsession the session that is to be closed
    * @return OK on success, SYSERR if the operation failed
    */
-  int (*disconnect)(TSession * tsession);  
+  int (*disconnect)(TSession * tsession);
 
   /**
    * Start the server process to receive inbound traffic.

Modified: GNUnet/src/include/gnunet_transport_service.h
===================================================================
--- GNUnet/src/include/gnunet_transport_service.h       2005-03-20 23:31:34 UTC 
(rev 463)
+++ GNUnet/src/include/gnunet_transport_service.h       2005-03-20 23:54:53 UTC 
(rev 464)
@@ -31,8 +31,8 @@
 
 /**
  * Type of the per-transport callback method.
- */ 
-typedef void (*TransportCallback)(TransportAPI * tapi, 
+ */
+typedef void (*TransportCallback)(TransportAPI * tapi,
                                  void * data);
 
 /**
@@ -69,7 +69,7 @@
    */
   void (*forEach)(TransportCallback callback,
                  void * data);
-  
+
   /**
    * Connect to a remote host using the advertised transport
    * layer. This may fail if the appropriate transport mechanism is
@@ -90,7 +90,7 @@
    * core if the connection is being closed. Associate can also be
    * called to test if it would be possible to associate the session
    * later, in this case, use disconnect afterwards.
-   * 
+   *
    * @param tsession the session handle passed along
    *   from the call to receive that was made by the transport
    *   layer
@@ -98,7 +98,7 @@
    *         SYSERR if not.
    */
   int (*associate)(TSession * tsession);
-  
+
   /**
    * Get the cost of a message in for the given transport mechanism.
    */
@@ -115,9 +115,9 @@
   int (*send)(TSession * session,
              const void * msg,
              const unsigned int size);
-  
+
   /**
-   * Send a message.  
+   * Send a message.
    * Try to be more reliable than the usual transportSend.
    *
    * @param session the session identifying the connection
@@ -134,9 +134,9 @@
    * either connected or associated sessions.
    *
    * @return OK on success, SYSERR on error
-   */ 
+   */
   int (*disconnect)(TSession * session);
-  
+
   /**
    * Verify that a HELO is ok. Call a method
    * if the verification was successful.
@@ -144,17 +144,17 @@
    *        SYSERR if the transport mechanism is not supported
    */
   int (*verifyHELO)(const HELO_Message * helo);
-  
+
   /**
    * Convert HELO to string.
    */
   char * (*heloToString)(const HELO_Message * helo);
-  
+
   /**
    * Get the MTU for a given transport type.
    */
   int (*getMTU)(unsigned short ttype);
-  
+
   /**
    * Create a HELO advertisement for the given
    * transport type for this node.
@@ -177,7 +177,7 @@
    */
   int (*getAdvertisedHELOs)(int maxLen,
                            char * buff);
-  
+
 } Transport_ServiceAPI;
 
 /* end of gnunet_transport_service.h */

Modified: GNUnet/src/include/gnunet_util.h
===================================================================
--- GNUnet/src/include/gnunet_util.h    2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/include/gnunet_util.h    2005-03-20 23:54:53 UTC (rev 464)
@@ -24,7 +24,7 @@
  *
  * @author Christian Grothoff
  * @author Krista Bennett
- * @author Gerd Knorr <address@hidden> 
+ * @author Gerd Knorr <address@hidden>
  * @author Ioana Patrascu
  * @author Tzvetan Horozov
  */
@@ -47,7 +47,7 @@
 
 /**
  * Just the version number of GNUnet-util implementation.
- * Encoded as 
+ * Encoded as
  * 0.6.1-4 => 0x00060104
  * 4.5.2   => 0x04050200
  *
@@ -61,7 +61,7 @@
 #define GNUNET_UTIL_VERSION 0x00060901
 
 /**
- * We use an unsigned short in the protocol header, thus: 
+ * We use an unsigned short in the protocol header, thus:
  */
 #define MAX_BUFFER_SIZE 65536
 
@@ -79,7 +79,7 @@
 #define NO      0
 
 /**
- * @brief constants to specify time 
+ * @brief constants to specify time
  */
 #define cronMILLIS ((cron_t)1)
 #define cronSECONDS ((cron_t)(1000 * cronMILLIS))
@@ -90,8 +90,8 @@
 #define cronMONTHS ((cron_t)(30 * cronDAYS))
 #define cronYEARS ((cron_t)(365 * cronDAYS))
 
-/** 
- * @brief log levels 
+/**
+ * @brief log levels
  */
 #define LOG_NOTHING    0
 #define LOG_FATAL      1
@@ -105,7 +105,7 @@
 #define LOG_EVERYTHING 9
 
 /**
- * @brief length of the sessionkey in bytes (256 BIT sessionkey) 
+ * @brief length of the sessionkey in bytes (256 BIT sessionkey)
  */
 #define SESSIONKEY_LEN (256/8)
 
@@ -156,7 +156,7 @@
 
 /**
  * Default "long" version of the options, use
- * "vhdc:L:H:" in the short option argument 
+ * "vhdc:L:H:" in the short option argument
  * to getopt_long for now.
  */
 #define LONG_DEFAULT_OPTIONS \
@@ -179,12 +179,12 @@
  */
 typedef struct {
   /**
-   * The length of the struct (in bytes, including the length field itself) 
+   * The length of the struct (in bytes, including the length field itself)
    */
   unsigned short size;
 
   /**
-   * The type of the message (XX_CS_PROTO_XXXX) 
+   * The type of the message (XX_CS_PROTO_XXXX)
    */
   unsigned short type;
 
@@ -196,11 +196,11 @@
 typedef struct {
   /**
    * The CS header (values: sizeof(CS_RETURN_VALUE), CS_PROTO_RETURN_VALUE)
-   */ 
+   */
   CS_HEADER header;
 
   /**
-   * The return value (network byte order) 
+   * The return value (network byte order)
    */
   int return_value;
 } CS_RETURN_VALUE;
@@ -210,14 +210,14 @@
  */
 typedef struct {
   /**
-   * size of this MESSAGE_PART (network byte order) 
+   * size of this MESSAGE_PART (network byte order)
    */
   unsigned short size;
 
   /**
-   * type of the request, XX_p2p_PROTO_XXX (network byte order) 
+   * type of the request, XX_p2p_PROTO_XXX (network byte order)
    */
-  unsigned short type; 
+  unsigned short type;
 } p2p_HEADER;
 
 typedef void (*NotifyConfigurationUpdateCallback)();
@@ -230,7 +230,7 @@
 /**
  * Time for absolute times used by cron (64 bit)
  */
-typedef unsigned long long cron_t;  
+typedef unsigned long long cron_t;
 
 /**
  * 32-bit timer value.
@@ -269,7 +269,7 @@
 
 /**
  * @brief an IPv4 address
- */ 
+ */
 typedef struct {
   unsigned int addr; /* struct in_addr */
 } IPaddr;
@@ -329,13 +329,13 @@
  * of private RSA key information that is provided
  * by the RSA implementations.  This format is used
  * to serialize a private RSA key (typically when
- * writing it to disk).  
+ * writing it to disk).
  */
 typedef struct {
-  /** 
-   * Total size of the structure, in bytes, in big-endian! 
+  /**
+   * Total size of the structure, in bytes, in big-endian!
    */
-  unsigned short len; 
+  unsigned short len;
   unsigned short sizen;/*  in big-endian! */
   unsigned short sizee;/*  in big-endian! */
   unsigned short sized;/*  in big-endian! */
@@ -350,7 +350,7 @@
  * @brief an RSA signature
  */
 typedef struct {
-  unsigned char sig[RSA_ENC_LEN]; 
+  unsigned char sig[RSA_ENC_LEN];
 } Signature;
 
 /**
@@ -358,21 +358,21 @@
  */
 typedef struct {
   /**
-   * In big-endian, must be RSA_KEY_LEN+2 
+   * In big-endian, must be RSA_KEY_LEN+2
    */
-  unsigned short len; 
+  unsigned short len;
   /**
-   * Size of n in key; in big-endian! 
-   */ 
-  unsigned short sizen;  
+   * Size of n in key; in big-endian!
+   */
+  unsigned short sizen;
   /**
    * The key itself, contains n followed by e.
    */
   unsigned char key[RSA_KEY_LEN];
   /**
-   * Padding (must be 0) 
+   * Padding (must be 0)
    */
-  unsigned short padding; 
+  unsigned short padding;
 } PublicKey;
 
 /**
@@ -384,10 +384,10 @@
 
 
 /**
- * @brief Structure for MUTual EXclusion (Mutex).  
+ * @brief Structure for MUTual EXclusion (Mutex).
  *
  * Essentially a wrapper around pthread_mutex_t.
- */ 
+ */
 typedef struct Mutex {
   void * internal;
 } Mutex;
@@ -409,7 +409,7 @@
 } IPC_Semaphore;
 
 /**
- * Struct to refer to a GNUnet TCP connection. 
+ * Struct to refer to a GNUnet TCP connection.
  * This is more than just a socket because if the server
  * drops the connection, the client automatically tries
  * to reconnect (and for that needs connection information).
@@ -417,7 +417,7 @@
 typedef struct GNUNET_TCP_SOCKET {
 
   /**
-   * the socket handle, -1 if invalid / not life 
+   * the socket handle, -1 if invalid / not life
    */
   int socket;
 
@@ -427,29 +427,29 @@
    * use 0.
    */
   IPaddr ip;
-  
+
   /**
-   * the port number, in host byte order 
+   * the port number, in host byte order
    */
   unsigned short port;
 
   /**
    * Write buffer length for non-blocking writes.
-   */ 
+   */
   unsigned int outBufLen;
 
   /**
    * Write buffer for non-blocking writes.
-   */ 
+   */
   void * outBufPending;
 
-  Mutex readlock; 
+  Mutex readlock;
   Mutex writelock;
 
 } GNUNET_TCP_SOCKET;
 
-/** 
- * @brief type for session keys 
+/**
+ * @brief type for session keys
  */
 typedef struct {
   unsigned char key[SESSIONKEY_LEN];
@@ -516,7 +516,7 @@
  *
  * @param buf the data over which we're taking the CRC
  * @param len the length of the buffer in bytes
- * @return the resulting CRC32 checksum 
+ * @return the resulting CRC32 checksum
  */
 int crc32N(const void * buf, int len);
 
@@ -524,7 +524,7 @@
  * Produce a random value.
  *
  * @param i the upper limit (exclusive) for the random number
- * @return a random value in the interval [0,i[. 
+ * @return a random value in the interval [0,i[.
  */
 unsigned int randomi(unsigned int i);
 
@@ -589,7 +589,7 @@
 
 void registerConfigurationUpdateCallback
 (NotifyConfigurationUpdateCallback cb);
-  
+
 void unregisterConfigurationUpdateCallback
 (NotifyConfigurationUpdateCallback cb);
 
@@ -601,11 +601,11 @@
 
 /**
  * Read the specified configuration file. The previous
- * configuration will be discarded if this method is 
+ * configuration will be discarded if this method is
  * invoked twice. The configuration file that is read
- * can be set using setConfigurationString on 
+ * can be set using setConfigurationString on
  * section "FILES" and option "gnunet.conf".
- * 
+ *
  * This method should be invoked after the options have
  * been parsed (and eventually the configuration filename
  * default has been overriden) and if gnunetd receives
@@ -616,7 +616,7 @@
 /**
  * Obtain a filename from the given section and option.  If the
  * filename is not specified, die with the given error message (do not
- * die if errMsg == NULL). 
+ * die if errMsg == NULL).
  *
  * @param section from which section, may not be NULL
  * @param option which option, may not be NULL
@@ -700,7 +700,7 @@
  * Set the list of command line options (remainder after getopt style
  * parsing).
  *
- * @param value the values 
+ * @param value the values
  + @param count the number of values
  */
 void setConfigurationStringList(char ** value,
@@ -750,7 +750,7 @@
  * Get the current time (works just as "time", just
  * that we use the unit of time that the cron-jobs use).
  * @param setme will set the current time if non-null
- * @return the current time 
+ * @return the current time
  */
 cron_t cronTime(cron_t * setme);
 
@@ -791,7 +791,7 @@
  * running job and may return before the running job has terminated).
  *
  * @param method which method is listed?
- * @param repeat which repeat factor was chosen? 
+ * @param repeat which repeat factor was chosen?
  * @param data what was the data given to the method
  * @return the number of jobs removed
  */
@@ -857,8 +857,8 @@
 extern int GNoptopt;
 
 
-int GNgetopt_long (int argc, 
-                  char *const *argv, 
+int GNgetopt_long (int argc,
+                  char *const *argv,
                   const char *shortopts,
                   const struct GNoption *longopts,
                   int *longind);
@@ -879,7 +879,7 @@
 
 
 /**
- * Check if the given IP address is in the list of 
+ * Check if the given IP address is in the list of
  * IP addresses.
  * @param list a list of networks
  * @param ip the IP to check (in network byte order)
@@ -889,7 +889,7 @@
                  IPaddr ip);
 
 /**
- * Check if the given IP address is in the list of 
+ * Check if the given IP address is in the list of
  * IP addresses.
  * @param list a list of networks
  * @param ip the IP to check (in network byte order)
@@ -1003,7 +1003,7 @@
  * memory is available.  Don't use xmalloc_ directly. Use the
  * MALLOC macro.
  */
-void * xmalloc_(size_t size, 
+void * xmalloc_(size_t size,
                const char * filename,
                const int linenumber);
 
@@ -1013,7 +1013,7 @@
  * allocations larger than 40 MB.  If you don't expect the
  * possibility of very large allocations, use MALLOC instead.
  */
-void * xmalloc_unchecked_(size_t size, 
+void * xmalloc_unchecked_(size_t size,
                          const char * filename,
                          const int linenumber);
 
@@ -1046,7 +1046,7 @@
  * want to keep track of allocations.  Don't use xfree_
  * directly. Use the FREE macro.
  */
-void xfree_(void * ptr, 
+void xfree_(void * ptr,
            const char * filename,
            const int linenumber);
 
@@ -1056,7 +1056,7 @@
  * allocated with GROW using GROW(mem, size, 0) instead of FREE.
  *
  * @param ptr location where to free the memory. ptr must have
- *     been returned by STRDUP, MALLOC or GROW earlier. 
+ *     been returned by STRDUP, MALLOC or GROW earlier.
  */
 #define FREE(ptr) xfree_(ptr, __FILE__, __LINE__)
 
@@ -1076,7 +1076,7 @@
 
 /**
  * Wrapper around STRDUP.  Makes a copy of the zero-terminated string
- * pointed to by a. 
+ * pointed to by a.
  * @param a pointer to a zero-terminated string
  * @return a copy of the string including zero-termination
  */
@@ -1098,7 +1098,7 @@
 
 /**
  * Wrapper around STRNDUP.  Makes a copy of the zero-terminated string
- * pointed to by a. 
+ * pointed to by a.
  * @param a pointer to a zero-terminated string
  * @param n the maximum number of characters to copy (+1 for 0-termination)
  * @return a copy of the string including zero-termination
@@ -1128,7 +1128,7 @@
 /**
  * Grow a well-typed (!) array.  This is a convenience
  * method to grow a vector <tt>arr</tt> of size <tt>size</tt>
- * to the new (target) size <tt>tsize</tt>. 
+ * to the new (target) size <tt>tsize</tt>.
  * <p>
  *
  * Example (simple, well-typed stack):
@@ -1136,7 +1136,7 @@
  * <pre>
  * static struct foo * myVector = NULL;
  * static int myVecLen = 0;
- * 
+ *
  * static void push(struct foo * elem) {
  *   GROW(myVector, myVecLen, myVecLen+1);
  *   memcpy(&myVector[myVecLen-1], elem, sizeof(struct foo));
@@ -1155,7 +1155,7 @@
  *        not the size in bytes
  * @param size the number of elements in the existing vector (number
  *        of elements to copy over)
- * @param tsize the target size for the resulting vector, use 0 to 
+ * @param tsize the target size for the resulting vector, use 0 to
  *        free the vector (then, arr will be NULL afterwards).
  */
 #define GROW(arr,size,tsize) xgrow_((void**)&arr, sizeof(arr[0]), &size, 
tsize, __FILE__, __LINE__)
@@ -1185,7 +1185,7 @@
  *        for streams.
  * @returns the size of the encrypted block, -1 for errors
  */
-int encryptBlock(const void * block, 
+int encryptBlock(const void * block,
                 unsigned short len,
                 const SESSIONKEY * sessionkey,
                 const INITVECTOR * iv,
@@ -1200,7 +1200,7 @@
  * @param result address to store the result at
  * @return -1 on failure, size of decrypted block on success
  */
-int decryptBlock(const SESSIONKEY * sessionkey, 
+int decryptBlock(const SESSIONKEY * sessionkey,
                 const void * block,
                 unsigned short size,
                 const INITVECTOR * iv,
@@ -1279,10 +1279,10 @@
  * @param handle handle to the pthread (for detaching, join)
  * @param main the main method of the thread
  * @param arg the argument to main
- * @param stackSize the size of the stack of the thread in bytes. 
- *        Note that if the stack overflows, some OSes (seen under BSD) 
+ * @param stackSize the size of the stack of the thread in bytes.
+ *        Note that if the stack overflows, some OSes (seen under BSD)
  *        will just segfault and gdb will give a messed-up stacktrace.
- * @return see pthread_create 
+ * @return see pthread_create
  */
 int PTHREAD_CREATE(PTHREAD_T * handle,
                   PThreadMain main,
@@ -1323,19 +1323,19 @@
 /**
  * While we must define these globally to make the
  * compiler happy, always use the macros in the sources
- * instead! 
+ * instead!
  */
 void create_mutex_(Mutex * mutex);
 void create_recursive_mutex_(Mutex * mutex);
 void create_fast_mutex_(Mutex * mutex);
 void destroy_mutex_(Mutex * mutex);
-void mutex_lock_(Mutex * mutex, 
+void mutex_lock_(Mutex * mutex,
                 const char * filename,
                 const int linenumber);
-void mutex_unlock_(Mutex * mutex, 
+void mutex_unlock_(Mutex * mutex,
                   const char * filename,
                   const int linenumber);
-Semaphore * semaphore_new_(int value, 
+Semaphore * semaphore_new_(int value,
                           const char * filename,
                           const int linenumber);
 void semaphore_free_(Semaphore * s,
@@ -1349,7 +1349,7 @@
                                const int linenumber);
 int semaphore_up_(Semaphore * s,
                  const char * filename,
-                 const int linenumber);                    
+                 const int linenumber);                
 
 /**
  * Convert hash to ASCII encoding.
@@ -1363,7 +1363,7 @@
 /**
  * Convert ASCII encoding back to hash
  * @param enc the encoding
- * @param result where to store the hash code 
+ * @param result where to store the hash code
  * @return OK on success, SYSERR if result has the wrong encoding
  */
 int enc2hash(const char * enc,
@@ -1376,15 +1376,15 @@
  * be somewhat consistent. And of course, the
  * result should be a positive number.
  */
-int distanceHashCode512(const HashCode512 * a, 
+int distanceHashCode512(const HashCode512 * a,
                        const HashCode512 * b);
- 
+
 /**
  * compare two hashcodes.
  */
-int equalsHashCode512(const HashCode512 * a, 
+int equalsHashCode512(const HashCode512 * a,
                      const HashCode512 * b);
- 
+
 /**
  * Hash block of given size.
  * @param block the data to hash, length is given as a second argument
@@ -1408,9 +1408,9 @@
  * @param second the second host
  * @returns 1 if the hosts are the same, 0 otherwise
  */
-int hostIdentityEquals(const PeerIdentity * first, 
+int hostIdentityEquals(const PeerIdentity * first,
                       const PeerIdentity * second);
- 
+
 void makeRandomId(HashCode512 * result);
 
 /* compute result(delta) = b - a */
@@ -1441,7 +1441,7 @@
  * @param bit index into the hashcode, [0...159]
  * @return Bit \a bit from hashcode \a code, -1 for invalid index
  */
-int getHashCodeBit(const HashCode512 * code, 
+int getHashCodeBit(const HashCode512 * code,
                   unsigned int bit);
 
 /**
@@ -1460,11 +1460,11 @@
 int hashCodeCompareDistance(const HashCode512 * h1,
                            const HashCode512 * h2,
                            const HashCode512 * target);
-  
+
 /**
  * create a new hostkey. Callee must free return value.
  */
-struct PrivateKey * makePrivateKey(); 
+struct PrivateKey * makePrivateKey();
 
 /**
  * Deterministically (!) create a hostkey using only the
@@ -1476,7 +1476,7 @@
  * Free memory occupied by hostkey
  * @param hostkey pointer to the memory to free
  */
-void freePrivateKey(struct PrivateKey * hostkey); 
+void freePrivateKey(struct PrivateKey * hostkey);
 
 /**
  * Extract the public key of the host.
@@ -1511,13 +1511,13 @@
  * @param target where to store the encrypted block
  * @returns SYSERR on error, OK if ok
  */
-int encryptPrivateKey(const void * block, 
+int encryptPrivateKey(const void * block,
                      unsigned short size,
                      const PublicKey * publicKey,
                      RSAEncryptedData * target);
 
 /**
- * Decrypt a given block with the hostkey. 
+ * Decrypt a given block with the hostkey.
  *
  * @param key the key to use
  * @param block the data to decrypt, encoded as returned by encrypt, not 
consumed
@@ -1525,7 +1525,7 @@
  * @param size how many bytes of a result are expected? Must be exact.
  * @returns the size of the decrypted block (that is, size) or -1 on error
  */
-int decryptPrivateKey(const struct PrivateKey * key, 
+int decryptPrivateKey(const struct PrivateKey * key,
                      const RSAEncryptedData * block,
                      void * result,
                      unsigned short size);
@@ -1538,7 +1538,7 @@
  * @param result where to write the signature
  * @return SYSERR on error, OK on success
  */
-int sign(const struct PrivateKey * key, 
+int sign(const struct PrivateKey * key,
         unsigned short size,
         const void * block,
         Signature * result);
@@ -1546,18 +1546,18 @@
 /**
  * Verify signature.
  * @param block the signed data
- * @param len the length of the block 
+ * @param len the length of the block
  * @param sig signature
  * @param publicKey public key of the signer
  * @returns OK if ok, SYSERR if invalid
  */
 int verifySig(const void * block,
              unsigned short len,
-             const Signature * sig,          
+             const Signature * sig,    
              const PublicKey * publicKey);
 
 /**
- * Initialize the util module. 
+ * Initialize the util module.
  * @param argc the number of arguments
  * @param argv the command line arguments
  * @param parser parser to call at the right moment
@@ -1606,10 +1606,10 @@
  * Read the contents of a bucket to a buffer.
  *
  * @param fn the hashcode representing the entry
- * @param result the buffer to write the result to 
+ * @param result the buffer to write the result to
  *        (*result should be NULL, sufficient space is allocated)
  * @return the number of bytes read on success, -1 on failure
- */ 
+ */
 int stateReadContent(const char * name,
                     void ** result);
 
@@ -1626,7 +1626,7 @@
                       const void * block);
 
 /**
- * Write content to a file. 
+ * Write content to a file.
  *
  * @param fn the key for the entry
  * @param len the number of bytes in block
@@ -1639,7 +1639,7 @@
 
 /**
  * Free space in the database by removing one file
- * @param name the hashcode representing the name of the file 
+ * @param name the hashcode representing the name of the file
  *        (without directory)
  */
 int stateUnlinkFromDB(const char * name);
@@ -1771,7 +1771,7 @@
  * c) from the configuration (HOSTNAME specification or static IP)
  *
  * Which way applies depends on the OS, the configuration
- * (dynDNS? static IP? NAT?) and at the end what the user 
+ * (dynDNS? static IP? NAT?) and at the end what the user
  * needs.
  *
  * @return SYSERR on error, OK on success
@@ -1787,7 +1787,7 @@
 
 /**
  * Get the load of the CPU relative to what is allowed.
- * 
+ *
  * @return the CPU load as a percentage of allowed
  *        (100 is equivalent to full load)
  */
@@ -1854,9 +1854,9 @@
 
 /**
  * Complete filename (a la shell) from abbrevition.
- * @param fil the name of the file, may contain ~/ or 
+ * @param fil the name of the file, may contain ~/ or
  *        be relative to the current directory
- * @returns the full file name, 
+ * @returns the full file name,
  *          NULL is returned on error
  */
 char * expandFileName(const char * fil);
@@ -1875,7 +1875,7 @@
  * @param len the maximum number of bytes to read
  * @param result the buffer to write the result to
  * @return the number of bytes read on success, -1 on failure
- */ 
+ */
 int readFile(const char * fileName,
             int len,
             void * result);
@@ -1886,8 +1886,8 @@
  * @param buffer the data to write
  * @param n number of bytes to write
  * @param mode the mode for file permissions
- */ 
-void writeFile(const char * fileName, 
+ */
+void writeFile(const char * fileName,
               const void * buffer,
               unsigned int n,
               const char * mode);
@@ -1901,7 +1901,7 @@
 
 /**
  * Build a filename from directory and filename, completing like the shell does
- * @param dir the name of the directory, may contain ~/ or other shell stuff. 
Will 
+ * @param dir the name of the directory, may contain ~/ or other shell stuff. 
Will
  *        NOT be freed!
  * @param fil the name of the file, will NOT be deallocated anymore!
  * @param result where to store the full file name (must be large enough!)
@@ -2083,7 +2083,7 @@
  *             0 is returned if no more bytes can be read
  * @return SYSERR on error, YES on success or NO if the operation
  *         would have blocked
- */ 
+ */
 int RECV_NONBLOCKING(int s,
                     void * buf,
                     size_t max,
@@ -2115,8 +2115,8 @@
  * @param max maximum number of bytes to send
  * @param sent number of bytes actually sent
  * @return SYSERR on error, YES on success or
- *         NO if the operation would have blocked. 
- */ 
+ *         NO if the operation would have blocked.
+ */
 int SEND_NONBLOCKING(int s,
                     const void * buf,
                     size_t max,
@@ -2174,10 +2174,10 @@
 size_t vectorSize(struct Vector * v);
 
 /**
- * Insert a new element in the vector at given index. 
+ * Insert a new element in the vector at given index.
  * @return OK on success, SYSERR if the index is out of bounds.
  */
-int vectorInsertAt(struct Vector * v, 
+int vectorInsertAt(struct Vector * v,
                   void * object,
                   unsigned int index);
 
@@ -2190,10 +2190,10 @@
  * Return the element at given index in the vector or NULL if the index is out
  * of bounds. The iterator is set to point to the returned element.
  */
-void * vectorGetAt(struct Vector * v, 
+void * vectorGetAt(struct Vector * v,
                   unsigned int index);
 
-/** 
+/**
  * Return the first element in the vector, whose index is 0, or NULL if the
  * vector is empty. The iterator of the vector is set to point to the first
  * element.
@@ -2209,7 +2209,7 @@
 /**
  * Return the next element in the vector, as called after vector_get_at() or
  * vector_get_first(). The return value is NULL if there are no more elements
- * in the vector or if the iterator has not been set. 
+ * in the vector or if the iterator has not been set.
  */
 void * vectorGetNext(struct Vector * v);
 
@@ -2221,10 +2221,10 @@
 void * vectorGetPrevious(struct Vector * v);
 
 /**
- * Delete and return the element at given index. NULL is returned if index is 
- * out of bounds. 
+ * Delete and return the element at given index. NULL is returned if index is
+ * out of bounds.
  */
-void * vectorRemoveAt(struct Vector * v, 
+void * vectorRemoveAt(struct Vector * v,
                      unsigned int index);
 
 /**
@@ -2240,33 +2240,33 @@
 void * vectorRemoveObject(struct Vector * v, void * object);
 
 /**
- * Set the given index in the vector. The old value of the index is 
+ * Set the given index in the vector. The old value of the index is
  * returned, or NULL if the index is out of bounds.
  */
 void * vectorSetAt(struct Vector * v,
-                  void * object, 
+                  void * object,
                   unsigned int index);
 
 /**
  * Set the index occupied by the given object to point to the new object.
  * The old object is returned, or NULL if it's not found.
  */
-void * vectorSetObject(struct Vector * v, 
+void * vectorSetObject(struct Vector * v,
                       void * object,
                       void * old_object);
 
-/** 
+/**
  * Swaps the contents of index1 and index2. Return value is OK
  * on success, SYSERR if either index is out of bounds.
  */
-int vectorSwap(struct Vector * v, 
-              unsigned int index1, 
+int vectorSwap(struct Vector * v,
+              unsigned int index1,
               unsigned int index2);
 
 /**
  * Return the index of given element or -1 if the element is not found.
  */
-unsigned int vectorIndexOf(struct Vector * v, 
+unsigned int vectorIndexOf(struct Vector * v,
                           void * object);
 
 /**

Modified: GNUnet/src/include/platform.h
===================================================================
--- GNUnet/src/include/platform.h       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/include/platform.h       2005-03-20 23:54:53 UTC (rev 464)
@@ -36,7 +36,7 @@
 /**
  * For strptime (glibc2 needs this).
  */
-#define _XOPEN_SOURCE 
+#define _XOPEN_SOURCE
 
 
 /* configuration options */
@@ -84,7 +84,7 @@
 #endif
 #include <sys/stat.h>
 #include <sys/types.h>
-#ifndef _MSC_VER 
+#ifndef _MSC_VER
 #include <dirent.h> /* KLB_FIX */
 #endif
 #include <fcntl.h>
@@ -101,7 +101,7 @@
  #endif
 #endif
 
-/* if we have both openssl & libgcrypt, stick 
+/* if we have both openssl & libgcrypt, stick
    to openssl for now (who has the obscure
    libgcrypt CVS version that works for us!?...) */
 #if USE_OPENSSL
@@ -267,7 +267,7 @@
  #define BIND(s, n, l) _win_bind(s, n, l)
  #define CONNECT(s, n, l) _win_connect(s, n, l)
  #define GETPEERNAME(s, n, l) _win_getpeername(s, n, l)
- #define GETSOCKNAME(s, n, l) _win_getsockname(s, n, l) 
+ #define GETSOCKNAME(s, n, l) _win_getsockname(s, n, l)
  #define GETSOCKOPT(s, l, o, v, p) _win_getsockopt(s, l, o, v, p)
  #define LISTEN(s, b) _win_listen(s, b)
  #define RECV(s, b, l, f) _win_recv(s, b, l, f)

Modified: GNUnet/src/include/winproc.h
===================================================================
--- GNUnet/src/include/winproc.h        2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/include/winproc.h        2005-03-20 23:54:53 UTC (rev 464)
@@ -438,7 +438,7 @@
 int _win_connect(SOCKET s,const struct sockaddr *name, int namelen);
 int _win_getpeername(SOCKET s, struct sockaddr *name,
                 int *namelen);
-int _win_getsockname(SOCKET s, struct sockaddr *name, 
+int _win_getsockname(SOCKET s, struct sockaddr *name,
                 int *namelen);
 int _win_getsockopt(SOCKET s, int level, int optname, char *optval,
                                int *optlen);

Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c      2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/server/connection.c      2005-03-20 23:54:53 UTC (rev 464)
@@ -33,7 +33,7 @@
  * noise, encryption and deferred sending of these messages.<p>
  *
  * The file is organized as follows:
- * 
+ *
  * a) includes
  * b) defines
  * c) typedefs
@@ -43,7 +43,7 @@
  *
  * @author Tzvetan Horozov
  * @author Christian Grothoff
- */ 
+ */
 
 #include "platform.h"
 #include "gnunet_protocols.h"
@@ -72,7 +72,7 @@
 #define SECONDS_NOPINGPONG_DROP 150
 
 /**
- * If an established connection is inactive for 5 minutes, 
+ * If an established connection is inactive for 5 minutes,
  * drop.
  */
 #define SECONDS_INACTIVE_DROP 300
@@ -145,7 +145,7 @@
  * How often do we expect to re-run the traffic allocation
  * code? (depends on MINIMUM_SAMPLE_COUNT and MIN_BPM_PER_PEER
  * and MTU size).
- * With MSC 16 and 5 minutes inactivity timeout and TMSID 32 about every 148s 
+ * With MSC 16 and 5 minutes inactivity timeout and TMSID 32 about every 148s
  */
 #define MIN_SAMPLE_TIME (MINIMUM_SAMPLE_COUNT * cronMINUTES * EXPECTED_MTU / 
MIN_BPM_PER_PEER)
 
@@ -155,16 +155,16 @@
 #define MAX_SEND_BUFFER_SIZE 256
 
 /**
- * Status constants 
- * 
+ * Status constants
+ *
  * Protocol goes like this:
  *          DOWN
- *   -> HELO+SKEY+PING(1) -> 
+ *   -> HELO+SKEY+PING(1) ->
  *        SKEY_SENT
  *  <- HELO+SKEY+PONG(1)+PING(2) <-
  *       -> PONG(2) ->
  *           UP
- *  
+ *
  * Note that the second HELO may not be necessary from a protocol
  * point of view, but makes sense for symmetry and to provide the
  * other side with an up-to-date HELO.  For the other side, it looks
@@ -182,7 +182,7 @@
  * If a peer wants to shutdown a connection
  * immediately (be polite, not let it time-out,
  * save bandwidth), he sends:
- * 
+ *
  *          UP
  *      -> HANGUP ->
  *         DOWN
@@ -190,7 +190,7 @@
  * The other side then does:
  *          UP
  *      <- HANGUP -<
- *         DOWN 
+ *         DOWN
  *
  * A 3-way handshake does not happen for
  * the shutdown since it is not reliable
@@ -315,7 +315,7 @@
    */
   unsigned short mtu;
 
-  /** 
+  /**
    * The session handle specific for the transport service.
    */
   TSession * tsession;
@@ -338,7 +338,7 @@
   /** at which time was the remote sessionkey created */
   TIME_T skey_remote_created;
   /** is this host alive? timestamp of the time of the last-active point */
-  cron_t isAlive; 
+  cron_t isAlive;
   /**  Status of the connection (STAT_XXX) */
   unsigned int status;
 
@@ -353,14 +353,14 @@
 
   /** number of entries in the send buffer */
   unsigned int sendBufferSize;
-  
+
   /** buffer of entries waiting to be transmitted */
   SendEntry ** sendBuffer;
 
   /** time of the last send-attempt (to avoid
       solving knapsack's too often) */
   cron_t lastSendAttempt;
-  
+
   /**
    * How frequent (per connection!) may we attempt to solve the knapsack
    * problem and send a message out? Note that setting this value higher
@@ -485,7 +485,7 @@
 
 /* ******************** CODE ********************* */
 
-/** 
+/**
  * This allocates and initializes a BufferEntry.
  * @return the initialized BufferEntry
  */
@@ -493,9 +493,9 @@
   BufferEntry * be;
 
   be = (BufferEntry*) MALLOC(sizeof(BufferEntry));
-  be->isAlive 
+  be->isAlive
     = 0;
-  be->status 
+  be->status
     = STAT_DOWN;
   be->sendBuffer
     = NULL;
@@ -538,12 +538,12 @@
     return;
   delta = now - be->last_bps_update;
   if (be->max_bpm * delta < cronMINUTES)
-    return; 
+    return;
   be->available_send_window =
     be->available_send_window + be->max_bpm * delta / cronMINUTES;
   if (be->available_send_window > (long long) be->max_bpm * MAX_BUF_FACT)
     be->available_send_window = (long long) be->max_bpm * MAX_BUF_FACT;
-  be->last_bps_update = now;    
+  be->last_bps_update = now;
 }
 
 
@@ -570,15 +570,15 @@
  * (by priority/len).
  *
  * The code falls back to this function if the CPU is
- * too busy.  As long as the CPU is idle, solveKnapsack 
+ * too busy.  As long as the CPU is idle, solveKnapsack
  * is used.
  *
  * @param be the send buffer that is scheduled
  * @param available what is the maximum length available?
  * @param solution int[count] to store the solution as "YES" and "NO" values
- * @return the overall priority that was achieved 
- */ 
-static unsigned int 
+ * @return the overall priority that was achieved
+ */
+static unsigned int
 approximateKnapsack(BufferEntry * be,
                    unsigned int available,
                    int * solution) {
@@ -597,10 +597,10 @@
     if (entries[i]->len <= left) {
       solution[i] = YES;
       left -= entries[i]->len;
-      max += entries[i]->pri;     
+      max += entries[i]->pri;
     } else {
       solution[i] = NO;
-    }    
+    }
   }
   return max;
 }
@@ -609,7 +609,7 @@
  * Solve the 0-1 knapsack problem.  Given "count" "entries" of
  * different "len" and "pri"ority and the amount of space "available",
  * compute the "solution", which is the set of entries to transport.
- * 
+ *
  * Solving this problem is NP complete in "count", but given that
  * available is small, the complexity is actually
  * "O(count*available)".
@@ -617,9 +617,9 @@
  * @param be the send buffer that is scheduled
  * @param available what is the maximum length available?
  * @param solution int[count] to store the solution as "YES" and "NO" values
- * @return the overall priority that was achieved 
+ * @return the overall priority that was achieved
  */
-static unsigned int 
+static unsigned int
 solveKnapsack(BufferEntry * be,
              unsigned int available,
              int * solution) {
@@ -657,9 +657,9 @@
     return max;
   }
 
-  /* division of sizes & available by gcd(sizes,available) 
+  /* division of sizes & available by gcd(sizes,available)
      to reduce cost to O(count*available/gcd) in terms of
-     CPU and memory.  Since gcd is almost always at least 
+     CPU and memory.  Since gcd is almost always at least
      4, this is probably a good idea (TM)  :-) */
   efflen = MALLOC(sizeof(int)*count);
   max = available;
@@ -669,13 +669,13 @@
   for (i=0;i<count;i++)
     efflen[i] = entries[i]->len / max;
 
-  /* dynamic programming: 
+  /* dynamic programming:
      VARR(i,j) stores the maximum value of any subset
      of objects {1, ... i} that can fit into a knapsack
      of weight j. */
   v = MALLOC(sizeof(long long) * (count+1) * (available+1));
-  memset(v, 
-        0, 
+  memset(v,
+        0,
         sizeof(long long) * (count+1) * (available+1));
   for (j=1;j<=available;j++)
     VARR(0,j) = -1;
@@ -697,11 +697,11 @@
       /*
       printf("i: %d j: %d (of %d) efflen: %d take: %d "
              "leave %d e[i-1]->pri %d VAR(i-1,j-eff) %lld VAR(i,j) %lld\n",
-            i, 
-            j, 
+            i,
+            j,
             available,
             efflen[i-1],
-            take_val, 
+            take_val,
             leave_val,
             entries[i-1]->pri,
             VARR(i-1,j-efflen[i-1]),
@@ -727,7 +727,7 @@
     if (j >= efflen[i-1]) {
       if (VARR(i-1, j-efflen[i-1]) + entries[i-1]->pri == VARR(i,j)) {
        j -= efflen[i-1];
-       solution[i-1] = YES; 
+       solution[i-1] = YES;
       }
     }
   }
@@ -760,7 +760,7 @@
   if (load >= 150) {
     return SYSERR; /* => always drop */
   }
-  if (load > 100) { 
+  if (load > 100) {
     if (priority >= EXTREME_PRIORITY) {
       return OK; /* allow administrative msgs */
     } else {
@@ -776,11 +776,11 @@
      at 75% require priority >= 15626 = (load-50)^3
      at 100% require priority >= 125000 = (load-50)^3
      (cubic function)
-  */ 
+  */
   delta = load - 50; /* now delta is in [1,50] with 50 == 100% load */
   if (delta * delta * delta > priority ) {
-#if DEBUG_POLICY 
-    LOG(LOG_DEBUG, 
+#if DEBUG_POLICY
+    LOG(LOG_DEBUG,
        "Network load is too high (%d%%, priority is %u, require %d), "
        "dropping outgoing.\n",
        load,
@@ -790,7 +790,7 @@
     return SYSERR; /* drop */
   } else {
 #if DEBUG_POLICY
-    LOG(LOG_DEBUG, 
+    LOG(LOG_DEBUG,
        "Network load is ok (%d%%, priority is %u >= %d), "
        "sending outgoing.\n",
        load,
@@ -835,10 +835,10 @@
   if (be == NULL) {
     BREAK();
     return;
-  }  
+  }
   if (be->status != STAT_UP)
     return; /* status is not up, cannot send! */
-  if (be->sendBufferSize == 0) 
+  if (be->sendBufferSize == 0)
     return; /* nothing to send */
 
   /* recompute max send frequency */
@@ -847,7 +847,7 @@
 
   if (be->session.mtu == 0) {
     be->MAX_SEND_FREQUENCY = /* ms per message */
-      EXPECTED_MTU 
+      EXPECTED_MTU
       / (be->max_bpm * cronMINUTES / cronMILLIS) /* bytes per ms */
       / 2;
   } else {
@@ -859,7 +859,7 @@
   /* Also: allow at least MINIMUM_SAMPLE_COUNT knapsack
      solutions for any MIN_SAMPLE_TIME! */
   if (be->MAX_SEND_FREQUENCY > MIN_SAMPLE_TIME / MINIMUM_SAMPLE_COUNT)
-    be->MAX_SEND_FREQUENCY = MIN_SAMPLE_TIME / MINIMUM_SAMPLE_COUNT;  
+    be->MAX_SEND_FREQUENCY = MIN_SAMPLE_TIME / MINIMUM_SAMPLE_COUNT;
 
   if ( (be->lastSendAttempt + be->MAX_SEND_FREQUENCY > cronTime(NULL)) &&
        (be->sendBufferSize < MAX_SEND_BUFFER_SIZE/4) ) {
@@ -872,7 +872,7 @@
 
   /* test if receiver has enough bandwidth available!  */
   updateCurBPS(be);
-#if DEBUG_CONNECTION 
+#if DEBUG_CONNECTION
   LOG(LOG_DEBUG,
       "receiver window available: %lld bytes (MTU: %u)\n",
       be->available_send_window,
@@ -899,18 +899,18 @@
        break;
       }
       i++;
-    }        
+    }
     while ( (i < be->sendBufferSize) &&
            (be->available_send_window > totalMessageSize) ) {
       if ( (entries[i]->len + totalMessageSize <=
-           be->available_send_window) && 
+           be->available_send_window) &&
           (totalMessageSize + entries[i]->len < MAX_BUFFER_SIZE) ) {
        knapsackSolution[i] = YES;
        totalMessageSize += entries[i]->len;
        priority += entries[i]->pri;
       } else {
        knapsackSolution[i] = NO;
-       if (totalMessageSize == sizeof(P2P_Message)) {    
+       if (totalMessageSize == sizeof(P2P_Message)) {  
          /* if the highest-priority message does not yet
             fit, wait for send window to grow so that
             we can get it out (otherwise we would starve
@@ -929,11 +929,11 @@
         the message if there is nothing else to do! */
       FREE(knapsackSolution);
       return;
-    }      
+    }
   } else { /* if (be->session.mtu == 0) */
     /* solve knapsack problem, compute accumulated priority */
     knapsackSolution = MALLOC(sizeof(int) * be->sendBufferSize);
-    
+
     approxProb = getCPULoad();
     if (approxProb > 50) {
       if (approxProb > 100)
@@ -941,7 +941,7 @@
       approxProb = 100 - approxProb; /* now value between 0 and 50 */
       approxProb *= 2; /* now value between 0 [always approx] and 100 [never 
approx] */
       /* control CPU load probabilistically! */
-      if (randomi(1+approxProb) == 0) { 
+      if (randomi(1+approxProb) == 0) {
        priority = approximateKnapsack(be,
                                       be->session.mtu - sizeof(P2P_Message),
                                       knapsackSolution);
@@ -975,24 +975,24 @@
          j,
          be->sendBufferSize,
          be->session.mtu - sizeof(P2P_Message));
-      
+
       for (j=0;j<be->sendBufferSize;j++)
        LOG(LOG_ERROR,
            _("Message details: %u: length %d, priority: %d\n"),
-           j, 
+           j,
            be->sendBuffer[j]->len,
            be->sendBuffer[j]->pri);
       FREE(knapsackSolution);
       return;
     }
-    
+
     if (be->available_send_window < be->session.mtu) {
       /* if we have a very high priority, we may
         want to ignore bandwidth availability (e.g. for HANGUP,
         which  has EXTREME_PRIORITY) */
       if (priority < EXTREME_PRIORITY) {
        FREE(knapsackSolution);
-#if DEBUG_CONNECTION 
+#if DEBUG_CONNECTION
        LOG(LOG_DEBUG,
            "bandwidth limits prevent sending (send window %u too small).\n",
            be->available_send_window);
@@ -1002,8 +1002,8 @@
     }
     totalMessageSize = be->session.mtu;
   } /* end MTU > 0 */
-    
-  expired = cronTime(NULL) - SECONDS_PINGATTEMPT * cronSECONDS; 
+
+  expired = cronTime(NULL) - SECONDS_PINGATTEMPT * cronSECONDS;
   /* if it's more than one connection "lifetime" old, always kill it! */
 
   /* check if we (sender) have enough bandwidth available */
@@ -1011,17 +1011,17 @@
     int msgCap;
     FREE(knapsackSolution);
     cronTime(&be->lastSendAttempt);
-#if DEBUG_CONNECTION 
+#if DEBUG_CONNECTION
     LOG(LOG_DEBUG,
        "policy prevents sending message (priority too low: %d)\n",
        priority);
 #endif
-    
+
     /* cleanup queue */
     if (getCPULoad() > 50)
       msgCap = 4;
-    else 
-      msgCap = 54 - getCPULoad();    
+    else
+      msgCap = 54 - getCPULoad();
     if (be->max_bpm > 2)
       msgCap += 2 * (int) log((double)be->max_bpm);
     /* allow at least msgCap msgs in buffer */
@@ -1043,16 +1043,16 @@
             be->sendBufferSize,
             be->sendBufferSize-1);
        i--; /* go again for this slot */
-      }        
+      }
     }
     return; /* deferr further */
   }
-  
+
   /* build message (start with sequence number) */
   GNUNET_ASSERT(totalMessageSize > sizeof(P2P_Message));
   plaintextMsg = MALLOC(totalMessageSize);
   p2pHdr = (P2P_Message*) plaintextMsg;
-  p2pHdr->timeStamp 
+  p2pHdr->timeStamp
     = htonl(TIME(NULL));
   p2pHdr->sequenceNumber
     = htonl(be->lastSequenceNumberSend);
@@ -1065,7 +1065,7 @@
   headpos = 0;
   tailpos = be->sendBufferSize-1;
   remainingBufferSize = be->sendBufferSize;
-  for (i=0;i<be->sendBufferSize;i++) 
+  for (i=0;i<be->sendBufferSize;i++)
     if (knapsackSolution[perm[i]] == YES) {
       remainingBufferSize--;
       switch (be->sendBuffer[perm[i]]->flags & SE_PLACEMENT_FLAG) {
@@ -1101,9 +1101,9 @@
        p2p_HEADER * part;
 
        part = (p2p_HEADER *) &plaintextMsg[p];
-       part->size 
+       part->size
          = htons(entry->len);
-       part->type 
+       part->type
          = htons(p2p_PROTO_NOISE);
        for (i=p+sizeof(p2p_HEADER);i<entry->len+p;i++)
          plaintextMsg[p] = (char) rand();
@@ -1125,12 +1125,12 @@
       if (be->max_bpm > 2) {
        msgCap += 2 * (int) log((double)be->max_bpm);
        if (msgCap >= MAX_SEND_BUFFER_SIZE-1)
-         msgCap = MAX_SEND_BUFFER_SIZE-2; /* try to make sure that there 
+         msgCap = MAX_SEND_BUFFER_SIZE-2; /* try to make sure that there
                                              is always room... */
       }
       if ( (remainingBufferSize > msgCap) &&
           (entry->transmissionTime < expired) ) {
-#if DEBUG_CONNECTION 
+#if DEBUG_CONNECTION
        LOG(LOG_DEBUG,
            "expiring message, expired %ds ago, queue size is %u (other 
messages went through)\n",
            (int) ((cronTime(NULL) - entry->transmissionTime) / cronSECONDS),
@@ -1149,13 +1149,13 @@
 
   /* cleanup/compact sendBuffer */
   j = 0;
-  for (i=0;i<be->sendBufferSize;i++) 
+  for (i=0;i<be->sendBufferSize;i++)
     if (be->sendBuffer[i] != NULL)
-      be->sendBuffer[j++] = be->sendBuffer[i];  
+      be->sendBuffer[j++] = be->sendBuffer[i];
   GROW(be->sendBuffer,
        be->sendBufferSize,
        targetSBLEN);
-    
+
   /* still room left? try callbacks! */
   pos = scl_nextHead;
   while (pos != NULL) {
@@ -1166,17 +1166,17 @@
     }
     pos = pos->next;
   }
-  
-  /* finally padd with noise */  
+
+  /* finally padd with noise */
   if ( (p + sizeof(p2p_HEADER) <= totalMessageSize) &&
        (disable_random_padding == NO) ) {
     p2p_HEADER * part;
     unsigned short noiseLen = totalMessageSize - p;
 
     part = (p2p_HEADER *) &plaintextMsg[p];
-    part->size 
+    part->size
       = htons(noiseLen);
-    part->type 
+    part->type
       = htons(p2p_PROTO_NOISE);
     for (i=p+sizeof(p2p_HEADER);
         i < totalMessageSize;
@@ -1185,7 +1185,7 @@
     p = totalMessageSize;
   }
 
-  encryptedMsg = MALLOC(p); 
+  encryptedMsg = MALLOC(p);
   hash(&p2pHdr->sequenceNumber,
        p - sizeof(HashCode512),
        (HashCode512*) encryptedMsg);
@@ -1208,10 +1208,10 @@
                                        reset to 0 at least... */
     be->lastSequenceNumberSend++;
     if (be->idealized_limit > be->max_transmitted_limit)
-      be->max_transmitted_limit 
+      be->max_transmitted_limit
        = be->idealized_limit;
     else /* age */
-      be->max_transmitted_limit 
+      be->max_transmitted_limit
        = (be->idealized_limit + be->max_transmitted_limit*3)/4;
 
     if (rsnSize > 0) {
@@ -1233,7 +1233,7 @@
 /**
  * Append a message to the current buffer. This method
  * assumes that the access to be is already synchronized.
- * 
+ *
  * @param be on which connection to transmit
  * @param se what to transmit (with meta-data)
  */
@@ -1241,7 +1241,7 @@
                           SendEntry * se) {
 #if DEBUG_CONNECTION
   EncName enc;
-#endif  
+#endif
   float apri;
   unsigned int i;
   SendEntry ** ne;
@@ -1266,9 +1266,9 @@
 
 #if DEBUG_CONNECTION
   IFLOG(LOG_DEBUG,
-       hash2enc(&be->session.sender.hashPubKey, 
+       hash2enc(&be->session.sender.hashPubKey,
                 &enc));
-  LOG(LOG_DEBUG, 
+  LOG(LOG_DEBUG,
       "adding message of size %d to buffer of host %s.\n",
       se->len,
       &enc);
@@ -1286,11 +1286,11 @@
     FREE(se);
     return;
   }
-  if (be->sendBufferSize >= MAX_SEND_BUFFER_SIZE) { 
+  if (be->sendBufferSize >= MAX_SEND_BUFFER_SIZE) {
     /* first, try to remedy! */
     sendBuffer(be);
     /* did it work? */
-    if (be->sendBufferSize >= MAX_SEND_BUFFER_SIZE) { 
+    if (be->sendBufferSize >= MAX_SEND_BUFFER_SIZE) {
       /* we need to enforce some hard limit here, otherwise we may take
         FAR too much memory (200 MB easily) */
 #if DEBUG_CONNECTION
@@ -1321,7 +1321,7 @@
   FREENONNULL(be->sendBuffer);
   be->sendBuffer = ne;
   be->sendBufferSize++;
-  sendBuffer(be);  
+  sendBuffer(be);
 }
 
 /**
@@ -1337,7 +1337,7 @@
   root = CONNECTION_buffer_[computeIndex(hostId)];
   while (root != NULL) {
     if (equalsHashCode512(&hostId->hashPubKey,
-                         &root->session.sender.hashPubKey)) 
+                         &root->session.sender.hashPubKey))
       return root;
     root = root->overflowChain;
   }
@@ -1348,24 +1348,24 @@
  * Force adding of a host to the buffer. If the node is already in the
  * table, the table entry is returned.  If the connection is down,
  * the session service is asked to try to establish a connection.
- * 
+ *
  * The connection lock must be held when calling this function.
  *
  * @param establishSession should we try to establish a session?
  * @param hostId for which peer should we get/create a connection
- * @return the table entry for the host 
+ * @return the table entry for the host
  */
 static BufferEntry * addHost(const PeerIdentity * hostId,
                             int establishSession) {
   BufferEntry * root;
   BufferEntry * prev;
-#if DEBUG_CONNECTION 
+#if DEBUG_CONNECTION
   EncName enc;
 
   IFLOG(LOG_EVERYTHING,
-       hash2enc(&hostId->hashPubKey, 
+       hash2enc(&hostId->hashPubKey,
                 &enc));
-  LOG(LOG_EVERYTHING, 
+  LOG(LOG_EVERYTHING,
       "Adding host '%s' to the connection table.\n",
       &enc);
 #endif
@@ -1379,7 +1379,7 @@
       /* settle for entry in the linked list that is down */
       if ( (root->status == STAT_DOWN) ||
           (equalsHashCode512(&hostId->hashPubKey,
-                             &root->session.sender.hashPubKey)) ) 
+                             &root->session.sender.hashPubKey)) )
        break;
       prev = root;
       root = root->overflowChain;
@@ -1393,11 +1393,11 @@
     }
     memcpy(&root->session.sender,
           hostId,
-          sizeof(PeerIdentity));        
-  } 
+          sizeof(PeerIdentity));       
+  }
   if ( (root->status == STAT_DOWN) &&
        (establishSession == YES) )
-    session->tryConnect(hostId); 
+    session->tryConnect(hostId);
   return root;
 }
 
@@ -1409,13 +1409,13 @@
  * @param method the method to invoke (NULL for couting only)
  * @param arg the second argument to the method
  * @return the number of connected hosts
- */ 
+ */
 static int forAllConnectedHosts(BufferEntryCallback method,
                                void * arg) {
   unsigned int i;
   int count = 0;
   BufferEntry * be;
-  
+
   ENTRY();
   for (i=0;i<CONNECTION_MAX_HOSTS_;i++) {
     be = CONNECTION_buffer_[i];
@@ -1433,8 +1433,8 @@
 
 /**
  * Little helper function for forEachConnectedNode.
- * 
- * @param be the connection 
+ *
+ * @param be the connection
  * @param arg closure of type fENHWrap giving the function
  *        to call
  */
@@ -1464,7 +1464,7 @@
   if (len > 0) {
     memcpy(buf, closure, len);
     FREE(closure);
-    return OK; 
+    return OK;
   } else {
     FREE(closure);
     return SYSERR;
@@ -1492,7 +1492,7 @@
     hangup.header.type = htons(p2p_PROTO_HANGUP);
     hangup.header.size = htons(sizeof(HANGUP_Message));
     identity->getPeerIdentity(identity->getPublicPrivateKey(),
-                             &hangup.sender);    
+                             &hangup.sender);
     se = MALLOC(sizeof(SendEntry));
     se->len = sizeof(HANGUP_Message);
     se->flags = SE_FLAG_PLACE_TAIL;
@@ -1507,12 +1507,12 @@
   }
   be->skey_remote_created = 0;
   be->status = STAT_DOWN;
-  be->idealized_limit = START_TRANSMIT_LIMIT; 
+  be->idealized_limit = START_TRANSMIT_LIMIT;
   be->max_transmitted_limit = START_TRANSMIT_LIMIT;
   if (be->session.tsession != NULL) {
     transport->disconnect(be->session.tsession);
     be->session.tsession = NULL;
-  }    
+  }
   for (i=0;i<be->sendBufferSize;i++) {
     FREENONNULL(be->sendBuffer[i]->closure);
     FREE(be->sendBuffer[i]);
@@ -1522,7 +1522,7 @@
        0);
 }
 
-/* ******** inbound bandwidth scheduling ************* */                  
+/* ******** inbound bandwidth scheduling ************* */              
 
 static void gatherEntries(BufferEntry * be,
                          UTL_Closure * utl) {
@@ -1543,14 +1543,14 @@
  * - proportional share: (x) [ bandwidth proportional to contribution ]
  * - square-root (sqrt(x))  [ contributing a lot more gives a little gain ]
  * - square share: (x*x) [ Bush's tax system: if you're rich, you get even 
more ]
- * 
+ *
  * Pretty much every monotonically increasing, always
  * positive function can be used.  The main loop normalizes later.
  */
 #define SHARE_DISTRIBUTION_FUNCTION(be) (be->current_connection_value)
 
 /**
- * What is the minimum number of peers to connect to that is 
+ * What is the minimum number of peers to connect to that is
  * still acceptable? (By dividing CONNECTION_MAX_HOSTS_ by
  * two, we specify to maintain at least 50% of the maximum
  * number of connections).
@@ -1576,12 +1576,12 @@
   unsigned int u;
   unsigned int minCon;
   long long schedulableBandwidth; /* MUST be unsigned! */
-  long long decrementSB; 
+  long long decrementSB;
   long long * adjustedRR;
   int didAssign;
 
   MUTEX_LOCK(&lock);
-  cronTime(&now);    
+  cronTime(&now);
 
   /* if this is the first round, don't bother... */
   if (lastRoundStart == 0) {
@@ -1614,7 +1614,7 @@
   forAllConnectedHosts((BufferEntryCallback)&gatherEntries,
                       &utl);
 
-  
+
   /* compute shares */
   shares = MALLOC(sizeof(double)*activePeerCount);
   shareSum = 0.0;
@@ -1633,7 +1633,7 @@
     for (u=0;u<activePeerCount;u++)
       shares[u] = 1 / activePeerCount;
   }
-  
+
   /* compute how much bandwidth we can bargain with */
   minCon = minConnect();
   if (minCon > activePeerCount)
@@ -1664,9 +1664,9 @@
 #endif
     /* Check for peers grossly exceeding send limits. Be a bit
      * reasonable and make the check against the max value we have
-     * sent to this peer (assume announcements may have got lost). 
+     * sent to this peer (assume announcements may have got lost).
      */
-    if (adjustedRR[u] > 2 * MAX_BUF_FACT * 
+    if (adjustedRR[u] > 2 * MAX_BUF_FACT *
        entries[u]->max_transmitted_limit) {
 #if DEBUG_CONNECTION
       EncName enc;
@@ -1690,7 +1690,7 @@
       adjustedRR[u] = adjustedRR[activePeerCount];
       u--;
     }
-    
+
     if (adjustedRR[u] < MIN_BPM_PER_PEER/2)
       adjustedRR[u] = MIN_BPM_PER_PEER/2; /* even if we received NO traffic, 
allow
                                             at least MIN_BPM_PER_PEER */
@@ -1699,7 +1699,7 @@
   /* now distribute the schedulableBandwidth according
      to the shares.  Note that since we cap peers at twice
      of what they transmitted last, we may not be done with
-     just one pass. 
+     just one pass.
 
      We don't wait until schedulableBandwidth hits 0 since that may
      take forever (due to rounding you can even take that literally).
@@ -1729,7 +1729,7 @@
       }
     }
     schedulableBandwidth -= decrementSB;
-    if ( (activePeerCount > 0) && 
+    if ( (activePeerCount > 0) &&
         (didAssign == NO) ) {
       int * perm = permute(activePeerCount);
       /* assign also to random "worthless" (zero-share) peers */
@@ -1744,29 +1744,29 @@
          schedulableBandwidth -= share - entries[v]->idealized_limit;
          entries[v]->idealized_limit = share;
        }
-      }      
+      }
       FREE(perm);
 
       if ( (schedulableBandwidth > 0) &&
           (activePeerCount > 0) ) {
        /* assign rest disregarding traffic limits */
        perm = permute(activePeerCount);
-       for (u=0;u<activePeerCount;u++) 
+       for (u=0;u<activePeerCount;u++)
          entries[perm[u]]->idealized_limit += (unsigned int) 
(schedulableBandwidth/activePeerCount);   
        schedulableBandwidth = 0;
        FREE(perm);
-      }    
+      }
       break;
     } /* didAssign == NO? */
   } /* while bandwidth to distribute */
- 
 
+
   /* randomly add the MIN_BPM_PER_PEER to minCon peers; yes, this will
      yield some fluctuation, but some amount of fluctuation should be
      good since it creates opportunities. */
   if (activePeerCount > 0)
-    for (u=0;u<minCon;u++) 
-      entries[randomi(activePeerCount)]->idealized_limit += MIN_BPM_PER_PEER;  
+    for (u=0;u<minCon;u++)
+      entries[randomi(activePeerCount)]->idealized_limit += MIN_BPM_PER_PEER;
 
   /* prepare for next round */
   lastRoundStart = now;
@@ -1794,7 +1794,7 @@
   MUTEX_UNLOCK(&lock);
 }
 
-/* ******** end of inbound bandwidth scheduling ************* */   
+/* ******** end of inbound bandwidth scheduling ************* */
 
 
 /**
@@ -1802,7 +1802,7 @@
  *
  * @param unused not used, just to make signature type nicely
  */
-static void cronDecreaseLiveness(void * unused) {  
+static void cronDecreaseLiveness(void * unused) {
   BufferEntry * root;
   BufferEntry * prev;
   BufferEntry * tmp;
@@ -1810,7 +1810,7 @@
   int i;
 
   scheduleInboundTraffic();
-  cronTime(&now);    
+  cronTime(&now);
   MUTEX_LOCK(&lock);
   for (i=0;i<CONNECTION_MAX_HOSTS_;i++) {
     root = CONNECTION_buffer_[i];
@@ -1831,7 +1831,7 @@
        if ( (now > root->isAlive) && /* concurrency might make this false... */
             (now - root->isAlive > SECONDS_INACTIVE_DROP * cronSECONDS) ) {
          EncName enc;
-         
+       
          /* switch state form UP to DOWN: too much inactivity */
          IFLOG(LOG_DEBUG,
                hash2enc(&root->session.sender.hashPubKey,
@@ -1842,26 +1842,26 @@
              now - root->isAlive);
          shutdownConnection(root);
          identity->whitelistHost(&root->session.sender); /* the host may still 
be worth trying again soon */
-       } 
+       }
        break;
       default: /* not up, not down - partial SKEY exchange */
        if ( (now > root->isAlive) &&
             (now - root->isAlive > SECONDS_NOPINGPONG_DROP * cronSECONDS) ) {
 #if DEBUG_CONNECTION
          EncName enc;
-         IFLOG(LOG_DEBUG, 
+         IFLOG(LOG_DEBUG,
                hash2enc(&root->session.sender.hashPubKey, &enc));
          LOG(LOG_DEBUG,
              "closing connection to %s: %s not answered.\n",
              &enc,
              (root->status == STAT_SKEY_SENT) ? "SKEY" : "PING");
 #endif
-         shutdownConnection(root);      
+         shutdownConnection(root);
        }
        break;
-      } /* end of switch */ 
+      } /* end of switch */
       sendBuffer(root);
-      prev = root; 
+      prev = root;
       root = root->overflowChain;
     } /* end of while */
   } /* for all buckets */
@@ -1903,7 +1903,7 @@
        &enc);
     return SYSERR;
   }
-  hash2enc(&sender->hashPubKey, 
+  hash2enc(&sender->hashPubKey,
           &enc);
   hash(&msg->sequenceNumber,
        size - sizeof(HashCode512),
@@ -1914,29 +1914,29 @@
        (msg->bandwidth == 0) &&
        (msg->timeStamp == 0) )
     return NO; /* plaintext */
-  
+
 #if DEBUG_CONNECTION
-  LOG(LOG_DEBUG, 
+  LOG(LOG_DEBUG,
       "Decrypting message from host '%s'\n",
       &enc);
-#endif  
+#endif
   MUTEX_LOCK(&lock);
   be = lookForHost(sender);
-  if ( (be == NULL) || 
+  if ( (be == NULL) ||
        (be->status == STAT_DOWN) ||
        (be->status == STAT_SKEY_SENT) ) {
-    LOG(LOG_INFO, 
+    LOG(LOG_INFO,
        "Decrypting message from host '%s' failed, no sessionkey (yet)!\n",
        &enc);
     /* try to establish a connection, that way, we don't keep
        getting bogus messages until the other one times out. */
     if ( (be == NULL) || (be->status == STAT_DOWN) )
-      addHost(sender, YES); 
+      addHost(sender, YES);
     MUTEX_UNLOCK(&lock);
     return SYSERR; /* could not decrypt */
   }
   tmp = MALLOC(size - sizeof(HashCode512));
-  res = decryptBlock(&be->skey_remote, 
+  res = decryptBlock(&be->skey_remote,
                     &msg->sequenceNumber,
                     size - sizeof(HashCode512),
                     (const INITVECTOR*) &msg->hash, /* IV */
@@ -1947,13 +1947,13 @@
   if ( ! ( (res != OK) &&
           equalsHashCode512(&hc,
                             &msg->hash)) ) {
-    LOG(LOG_INFO, 
+    LOG(LOG_INFO,
        "Decrypting message from host '%s' failed, wrong sessionkey!\n",
-       &enc);      
-    addHost(sender, YES); 
+       &enc);
+    addHost(sender, YES);
     MUTEX_UNLOCK(&lock);
     FREE(tmp);
-    return SYSERR;  
+    return SYSERR;
   }
   memcpy(&msg->sequenceNumber,
         tmp,
@@ -1963,25 +1963,25 @@
   sequenceNumber = ntohl(msg->sequenceNumber);
   if (be->lastSequenceNumberReceived >= sequenceNumber) {
     res = SYSERR;
-    if ( (be->lastSequenceNumberReceived - sequenceNumber <= 32) && 
+    if ( (be->lastSequenceNumberReceived - sequenceNumber <= 32) &&
         (be->lastSequenceNumberReceived != sequenceNumber) ) {
       unsigned int rotbit = 1 << (be->lastSequenceNumberReceived - 
sequenceNumber - 1);
       if ( (be->lastPacketsBitmap & rotbit) == 0) {
        be->lastPacketsBitmap |= rotbit;
        res = OK;
-      } 
-    } 
+      }
+    }
     if (res == SYSERR) {
       LOG(LOG_WARNING,
          _("Invalid sequence number"
            " %u <= %u, dropping rest of packet.\n"),
-         sequenceNumber, 
+         sequenceNumber,
          be->lastSequenceNumberReceived);
       MUTEX_UNLOCK(&lock);
       return SYSERR;
-    }    
-  } else {    
-    be->lastPacketsBitmap = 
+    }
+  } else {
+    be->lastPacketsBitmap =
       be->lastPacketsBitmap << (sequenceNumber - 
be->lastSequenceNumberReceived);
     be->lastSequenceNumberReceived = sequenceNumber;
   }
@@ -2002,10 +2002,10 @@
   if (be->available_send_window >= be->max_bpm) {
     be->available_send_window = be->max_bpm;
     cronTime(&be->last_bps_update);
-  }  
+  }
   be->recently_received += size;
-  if (be->status == STAT_UP) 
-    cronTime(&be->isAlive); 
+  if (be->status == STAT_UP)
+    cronTime(&be->isAlive);
   MUTEX_UNLOCK(&lock);
   return YES;
 }
@@ -2030,7 +2030,7 @@
                          &((HANGUP_Message*)msg)->sender))
     return SYSERR;
   IFLOG(LOG_INFO,
-       hash2enc(&sender->hashPubKey, 
+       hash2enc(&sender->hashPubKey,
                 &enc));
 #if DEBUG_CONNECTION
   LOG(LOG_INFO,
@@ -2057,7 +2057,7 @@
  * Assign a session key for traffic from or to a given peer.
  * If the core does not yet have an entry for the given peer
  * in the connection table, a new entry is created.
- * 
+ *
  * @param key the sessionkey,
  * @param peer the other peer,
  * @param forSending NO if it is the key for receiving,
@@ -2093,7 +2093,7 @@
 
 /**
  * Confirm that a connection is up.
- * 
+ *
  * @param peer the other peer,
  */
 void confirmSessionUp(const PeerIdentity * peer) {
@@ -2106,7 +2106,7 @@
       if (be->session.tsession == NULL) {
        HELO_Message * helo;
        helo = NULL;
-       if (OK == 
+       if (OK ==
            identity->identity2Helo(&be->session.sender,
                                    ANY_PROTOCOL_NUMBER,
                                    NO,
@@ -2115,7 +2115,7 @@
              transport->connect(helo,
                                 &be->session.tsession)) {
            be->session.mtu
-             = transport->getMTU(be->session.tsession->ttype);     
+             = transport->getMTU(be->session.tsession->ttype); 
          } else {
            LOG(LOG_WARNING,
                _("Session confirmed, but cannot connect! (bug?)"));
@@ -2192,7 +2192,7 @@
 
 /**
  * Obtain the session key used for traffic from or to a given peer.
- * 
+ *
  * @param key the sessionkey (set)
  * @param age the age of the key (set)
  * @param peer the other peer,
@@ -2259,7 +2259,7 @@
       if (be->session.tsession != NULL)
        cost = transport->getCost(be->session.tsession->ttype);
       /* Question: doesn't this always do takeover in tcp/udp
-        case, which have the same costs? Should it? -IW 
+        case, which have the same costs? Should it? -IW
 
         Answer: this will always switch to TCP in the long run (if
         that is possible) since udpAssociate always
@@ -2287,7 +2287,7 @@
  * The configuration may have changed.  In particular, bandwidth
  * limits may now be different.  Adjust the connection table
  * accordingly.
- */ 
+ */
 static void connectionConfigChangeCallback() {
   long new_max_bpm;
   unsigned int i;
@@ -2310,14 +2310,14 @@
     newMAXHOSTS
       = max_bpm / MIN_BPM_PER_PEER;
     /* => for 50000 bps, we get 78 (rounded DOWN to 64) connections! */
-  
+
     if (newMAXHOSTS < 2)
       newMAXHOSTS = 2; /* strict minimum is 2 */
     i = 1;
     while (i <= newMAXHOSTS)
       i*=2;
     newMAXHOSTS = i/2; /* make sure it's a power of 2 */
-    
+
     if (newMAXHOSTS != CONNECTION_MAX_HOSTS_) {
       /* change size of connection buffer!!! */
       unsigned int olen;
@@ -2329,7 +2329,7 @@
                          "connection-max-hosts",
                          CONNECTION_MAX_HOSTS_);
       newBuffer = (BufferEntry**) MALLOC(sizeof(BufferEntry*)*newMAXHOSTS);
-      for (i=0;i<CONNECTION_MAX_HOSTS_;i++) 
+      for (i=0;i<CONNECTION_MAX_HOSTS_;i++)
        newBuffer[i] = NULL;
 
       /* rehash! */
@@ -2356,8 +2356,8 @@
          (olen == 0) ? "" : "now ",
          CONNECTION_MAX_HOSTS_,
          max_bpm);
-      
-    }  
+
+    }
   }
   disable_random_padding = testConfigurationString("GNUNETD-EXPERIMENTAL",
                                                   "PADDING",
@@ -2370,9 +2370,9 @@
  */
 void initConnection() {
   ENTRY();
-  scl_nextHead 
+  scl_nextHead
     = NULL;
-  scl_nextTail 
+  scl_nextTail
     = NULL;
   MUTEX_CREATE_RECURSIVE(&lock);
   registerConfigurationUpdateCallback(&connectionConfigChangeCallback);
@@ -2381,13 +2381,13 @@
   registerp2pHandler(p2p_PROTO_HANGUP,
                     &handleHANGUP);
   addCronJob(&cronDecreaseLiveness,
-            1 * cronSECONDS, 
-            1 * cronSECONDS, 
-            NULL); 
+            1 * cronSECONDS,
+            1 * cronSECONDS,
+            NULL);
 #if DEBUG_COLLECT_PRIO == YES
   prioFile = FOPEN("/tmp/knapsack_prio.txt", "w");
 #endif
-  
+
   transport = requestService("transport");
   GNUNET_ASSERT(transport != NULL);
   identity  = requestService("identity");
@@ -2407,13 +2407,13 @@
   unsigned int i;
   BufferEntry * be;
   SendCallbackList * scl;
-  
+
   ENTRY();
   transport->stop();
   unregisterConfigurationUpdateCallback(&connectionConfigChangeCallback);
   delCronJob(&cronDecreaseLiveness,
             1 * cronSECONDS,
-            NULL); 
+            NULL);
   for (i=0;i<CONNECTION_MAX_HOSTS_;i++) {
     BufferEntry * prev;
 
@@ -2427,7 +2427,7 @@
       be = be->overflowChain;
       FREE(prev);
     }
-  } 
+  }
   MUTEX_DESTROY(&lock);
   FREENONNULL(CONNECTION_buffer_);
   CONNECTION_buffer_ = NULL;
@@ -2492,7 +2492,7 @@
     while (tmp != NULL) {
       if (tmp->status != STAT_DOWN) {
         IFLOG(LOG_MESSAGE,
-             hash2enc(&tmp->session.sender.hashPubKey, 
+             hash2enc(&tmp->session.sender.hashPubKey,
                       &hostName));
        IFLOG(LOG_MESSAGE,
              hash2enc((HashCode512*) &tmp->skey_local,
@@ -2509,7 +2509,7 @@
            i,
            tmp->status,
            ttype,
-           (int) ((cronTime(NULL) - tmp->isAlive)/cronSECONDS), 
+           (int) ((cronTime(NULL) - tmp->isAlive)/cronSECONDS),
            SECONDS_INACTIVE_DROP,
            tmp->recently_received,
            tmp->idealized_limit,
@@ -2562,9 +2562,9 @@
     scl_nextTail = scl;
   }
   MUTEX_UNLOCK(&lock);
-  return OK;  
+  return OK;
 }
- 
+
 /**
  * Unregister a handler that was registered with registerSendCallback.
  *
@@ -2582,14 +2582,14 @@
                           BufferFillCallback callback) {
   SendCallbackList * pos;
   SendCallbackList * prev;
-  
+
   prev = NULL;
   MUTEX_LOCK(&lock);
   pos = scl_nextHead;
   while (pos != NULL) {
     if ( (pos->callback == callback) &&
         (pos->minimumPadding == minimumPadding) ) {
-      if (prev == NULL) 
+      if (prev == NULL)
        scl_nextHead = pos->next;
       else
        prev->next = pos->next;
@@ -2597,7 +2597,7 @@
        scl_nextTail = prev;
       FREE(pos);
       MUTEX_UNLOCK(&lock);
-      return OK;     
+      return OK;
     }
     prev = pos;
     pos = pos->next;
@@ -2635,9 +2635,9 @@
         size);
   hash(&hdr->sequenceNumber,
        size + sizeof(P2P_Message) - sizeof(HashCode512),
-       &hdr->hash);  
-  ret = transport->send(tsession, 
-                       buf, 
+       &hdr->hash);
+  ret = transport->send(tsession,
+                       buf,
                        size + sizeof(P2P_Message));
   FREE(buf);
   return ret;
@@ -2665,18 +2665,18 @@
   EncName enc;
 
   IFLOG(LOG_DEBUG,
-       hash2enc(&hostId->hashPubKey, 
+       hash2enc(&hostId->hashPubKey,
                 &enc));
-  LOG(LOG_DEBUG, 
+  LOG(LOG_DEBUG,
       "unicast: sending message to host %s message of size %d\n",
       &enc,
       len);
 #endif
   ENTRY();
   MUTEX_LOCK(&lock);
-  be = addHost(hostId, YES); 
+  be = addHost(hostId, YES);
   if ( (be != NULL) &&
-       (be->status != STAT_DOWN) ) {  
+       (be->status != STAT_DOWN) ) {
     SendEntry * entry;
 
     entry = MALLOC(sizeof(SendEntry));
@@ -2743,15 +2743,15 @@
     return (be->status == STAT_UP);
   }
 }
-              
+       
 /**
  * Compute the hashtable index of a host id.
- * 
+ *
  * @param hostId the ID of a peer
  * @return the index for this peer in the connection table
  */
 unsigned int computeIndex(const PeerIdentity * hostId) {
-  unsigned int res = (((unsigned int)hostId->hashPubKey.bits[0]) & 
+  unsigned int res = (((unsigned int)hostId->hashPubKey.bits[0]) &
                      ((unsigned int)(CONNECTION_MAX_HOSTS_ - 1)));
   GNUNET_ASSERT(res <  CONNECTION_MAX_HOSTS_);
   return res;
@@ -2769,7 +2769,7 @@
 unsigned int getBandwidthAssignedTo(const PeerIdentity * node) {
   BufferEntry * be;
   unsigned int ret;
-  
+
   ENTRY();
   MUTEX_LOCK(&lock);
   be = lookForHost(node);
@@ -2777,11 +2777,11 @@
        (be->status != STAT_UP) ) {
     ret = be->idealized_limit;
     if (ret == 0)
-      ret = 1;  
+      ret = 1;
   } else
     ret = 0;
   MUTEX_UNLOCK(&lock);
-  return ret;  
+  return ret;
 }
 
 /**
@@ -2820,7 +2820,7 @@
 
 /**
  * Register a handler that is to be called for each
- * message that leaves the peer. 
+ * message that leaves the peer.
  *
  * @param callback the method to call for each
  *        P2P message part that is transmitted
@@ -2840,7 +2840,7 @@
 
 /**
  * Unregister a handler that is to be called for each
- * message that leaves the peer. 
+ * message that leaves the peer.
  *
  * @param callback the method to call for each
  *        P2P message part that is transmitted
@@ -2862,6 +2862,6 @@
   MUTEX_UNLOCK(&lock);
   return SYSERR;
 }
- 
 
+
 /* end of connection.c */

Modified: GNUnet/src/server/connection.h
===================================================================
--- GNUnet/src/server/connection.h      2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/server/connection.h      2005-03-20 23:54:53 UTC (rev 464)
@@ -20,7 +20,7 @@
  * @file server/connection.h
  * @author Tzvetan Horozov
  * @author Christian Grothoff
- */ 
+ */
 
 #ifndef CONNECTION_H
 #define CONNECTION_H
@@ -195,7 +195,7 @@
 
 /**
  * Return a pointer to the lock of the connection module.
- */ 
+ */
 Mutex * getConnectionModuleLock();
 
 
@@ -229,7 +229,7 @@
  * Offer the core a session for communication with the
  * given peer.  This is useful after establishing a connection
  * with another peer to hand it of to the core.  Note that
- * the core will take over the session and disconnect 
+ * the core will take over the session and disconnect
  * it as it feels like.  Thus the client should no longer
  * use it after this call.  If the core does not want/need
  * the session, it will also be disconnected.
@@ -242,7 +242,7 @@
  * Assign a session key for traffic from or to a given peer.
  * If the core does not yet have an entry for the given peer
  * in the connection table, a new entry is created.
- * 
+ *
  * @param key the sessionkey,
  * @param peer the other peer,
  * @param forSending NO if it is the key for receiving,
@@ -255,7 +255,7 @@
 
 /**
  * Obtain the session key used for traffic from or to a given peer.
- * 
+ *
  * @param key the sessionkey (set)
  * @param age the age of the key (set)
  * @param peer the other peer,
@@ -295,7 +295,7 @@
 
 /**
  * Confirm that a connection is up.
- * 
+ *
  * @param peer the other peer,
  */
 void confirmSessionUp(const PeerIdentity * peer);
@@ -303,7 +303,7 @@
 
 /**
  * Register a handler that is to be called for each
- * message that leaves the peer. 
+ * message that leaves the peer.
  *
  * @param callback the method to call for each
  *        P2P message part that is transmitted
@@ -313,15 +313,15 @@
 
 /**
  * Unregister a handler that is to be called for each
- * message that leaves the peer. 
+ * message that leaves the peer.
  *
  * @param callback the method to call for each
  *        P2P message part that is transmitted
  * @return OK on success, SYSERR if there is a problem
  */
 int unregisterSendNotify(MessagePartHandler callback);
- 
 
 
+
 #endif
 /* end of connection.h */

Modified: GNUnet/src/server/core.c
===================================================================
--- GNUnet/src/server/core.c    2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/server/core.c    2005-03-20 23:54:53 UTC (rev 464)
@@ -40,7 +40,7 @@
   /**
    * Pointer to the library (as returned by dlopen).
    */
-  void * library;  
+  void * library;
   /**
    * Textual name of the library ("libgnunet_afs_protocol").
    */
@@ -85,7 +85,7 @@
 /**
  * Load the application module named "pos".
  * @return OK on success, SYSERR on error
- */ 
+ */
 static int loadApplicationModule(const char * rpos) {
   int ok;
   ShutdownList * nxt;
@@ -102,11 +102,11 @@
   name = MALLOC(strlen(pos) + strlen("module_") + 1);
   strcpy(name, "module_");
   strcat(name, pos);
-  FREE(pos);    
+  FREE(pos);
 
   nxt = shutdownList;
   while (nxt != NULL) {
-    if (0 == strcmp(name, 
+    if (0 == strcmp(name,
                    nxt->dsoName)) {
       if (nxt->applicationInitialized == YES) {
        LOG(LOG_WARNING,
@@ -127,7 +127,7 @@
          nxt->applicationInitialized = YES;
        FREE(name);
        return ok;
-      }      
+      }
     }
     nxt = nxt->next;
   }
@@ -142,9 +142,9 @@
                           "initialize_",
                           name);
   if (mptr == NULL) {
-#if DEBUG_CORE     
+#if DEBUG_CORE
     LOG(LOG_DEBUG,
-       "Unloading library '%s' at %s:%d.\n", 
+       "Unloading library '%s' at %s:%d.\n",
        name, __FILE__, __LINE__);
 #endif
     unloadDynamicLibrary(library);
@@ -160,7 +160,7 @@
   nxt->servicePTR = NULL;
   shutdownList = nxt;
   ok = mptr(&applicationCore);
-  if (OK != ok) {    
+  if (OK != ok) {
     nxt->applicationInitialized = NO;
     /* FIXME: undo loading? */
     /* Note: we cannot assert that shutdownList == nxt here! */
@@ -186,13 +186,13 @@
        name);
     return SYSERR;
   }
-  
+
   if (pos->applicationInitialized != YES) {
     LOG(LOG_WARNING,
        _("Could not shutdown application '%s': not initialized\n"),
        name);
     return SYSERR;
-  }      
+  }
   mptr = bindDynamicMethod(pos->library,
                           "done_",
                           pos->dsoName);
@@ -218,24 +218,24 @@
 
   /* compute prev! */
   if (pos == shutdownList) {
-    prev = NULL; 
+    prev = NULL;
   } else {
     prev = shutdownList;
     while (prev->next != pos)
       prev = prev->next;
   }
- 
+
   if (0 == getConfigurationInt("GNUNETD",
                               "VALGRIND")) {
     /* do not unload plugins if we're using
        valgrind */
-#if DEBUG_CORE     
+#if DEBUG_CORE
     LOG(LOG_DEBUG,
-       "Unloading application plugin '%s' at %s:%d.\n", 
+       "Unloading application plugin '%s' at %s:%d.\n",
        pos->dsoName, __FILE__, __LINE__);
 #endif
     unloadDynamicLibrary(pos->library);
-  }    
+  }
   if (prev == NULL)
     shutdownList = pos->next;
   else
@@ -265,7 +265,7 @@
 
   nxt = shutdownList;
   while (nxt != NULL) {
-    if (0 == strcmp(name, 
+    if (0 == strcmp(name,
                    nxt->dsoName)) {
       if (nxt->serviceCount > 0) {
        if (nxt->servicePTR != NULL)
@@ -289,7 +289,7 @@
          return NULL;
        }
        nxt->servicePTR = mptr(&applicationCore);
-       if (nxt->servicePTR != NULL) 
+       if (nxt->servicePTR != NULL)
          nxt->serviceCount++;
        FREE(name);
 #if DEBUG_CORE
@@ -300,7 +300,7 @@
 #endif
        FREE(pos);
        return nxt->servicePTR;
-      }      
+      }
     }
     nxt = nxt->next;
   }
@@ -316,9 +316,9 @@
                           "provide_",
                           name);
   if (mptr == NULL) {
-#if DEBUG_CORE     
+#if DEBUG_CORE
        LOG(LOG_DEBUG,
-           "Unloading library '%s' at %s:%d.\n", 
+           "Unloading library '%s' at %s:%d.\n",
            name, __FILE__, __LINE__);
 #endif
     unloadDynamicLibrary(library);
@@ -339,7 +339,7 @@
       pos);
   api = mptr(&applicationCore);
   if (api != NULL) {
-    nxt->servicePTR = api;    
+    nxt->servicePTR = api;
   } else {
     LOG(LOG_WARNING,
        "Failed to load service '%s'\n",
@@ -365,7 +365,7 @@
     LOG(LOG_ERROR,
        _("Could not release %p: service not loaded\n"),
        service);
-    return SYSERR; 
+    return SYSERR;
   }
   if (pos->serviceCount > 1) {
 #if DEBUG_CORE
@@ -376,10 +376,10 @@
     pos->serviceCount--;
     return OK; /* service still in use elsewhere! */
   }
-  
+
   LOG(LOG_DEBUG,
-      "Unloading service '%s'.\n", 
-      pos->dsoName);   
+      "Unloading service '%s'.\n",
+      pos->dsoName);
   mptr = bindDynamicMethod(pos->library,
                           "release_",
                           pos->dsoName);
@@ -428,7 +428,7 @@
     unloadDynamicLibrary(pos->library);
   }
   FREE(pos->dsoName);
-  FREE(pos);    
+  FREE(pos);
   return OK;
 }
 
@@ -436,7 +436,7 @@
   char * dso;
   char * next;
   char * pos;
-  
+
   dso = getConfigurationString("GNUNETD",
                               "APPLICATIONS");
   if (dso == NULL) {
@@ -482,9 +482,9 @@
         (OK != unloadApplicationModule(pos->dsoName)) )
       LOG(LOG_ERROR,
          _("Could not properly shutdown application '%s'.\n"),
-         pos->dsoName);    
+         pos->dsoName);
     pos = nxt;
-  }   
+  }
 
 }
 
@@ -522,14 +522,14 @@
   applicationCore.queryBPMfromPeer = &getBandwidthAssignedTo; /* connection.c 
*/
   applicationCore.disconnectFromPeer = &disconnectFromPeer; /* connection.c */
 
-  applicationCore.sendValueToClient = &sendTCPResultToClient; /* tcpserver.c 
*/ 
+  applicationCore.sendValueToClient = &sendTCPResultToClient; /* tcpserver.c */
   applicationCore.sendToClient = &sendToClient; /* tcpserver.c */
   applicationCore.registerClientHandler = &registerCSHandler; /* tcpserver.c */
   applicationCore.unregisterClientHandler = &unregisterCSHandler; /* 
tcpserver.c */
   applicationCore.registerClientExitHandler = &registerClientExitHandler; /* 
tcpserver.c */
   applicationCore.unregisterClientExitHandler = &unregisterClientExitHandler; 
/* tcpserver.c */
   applicationCore.terminateClientConnection = &terminateClientConnection;  /* 
tcpserver.c */
-  
+
   applicationCore.injectMessage = &injectMessage; /* handler.c */
   applicationCore.computeIndex = &computeIndex; /* connection.c */
   applicationCore.getConnectionModuleLock = &getConnectionModuleLock; /* 
connection.c */
@@ -558,7 +558,7 @@
   releaseService(identity);
   identity = NULL;
 
-  /* unload all modules; 
+  /* unload all modules;
      due to mutual dependencies we have
      to do a fixpoint iteration here! */
   pos = shutdownList;
@@ -574,9 +574,9 @@
        if (0 == getConfigurationInt("GNUNETD",
                                     "VALGRIND")) {
          /* do not unload plugins if we're using valgrind */
-#if DEBUG_CORE     
+#if DEBUG_CORE
          LOG(LOG_DEBUG,
-             "Unloading library '%s' at %s:%d.\n", 
+             "Unloading library '%s' at %s:%d.\n",
              pos->dsoName, __FILE__, __LINE__);
 #endif 
          unloadDynamicLibrary(pos->library);
@@ -595,7 +595,7 @@
     }
   }
   pos = shutdownList;
-  while (pos != NULL) {      
+  while (pos != NULL) {
     LOG(LOG_ERROR,
        _("Could not properly unload service '%s'!\n"),
        pos->dsoName);

Modified: GNUnet/src/server/gnunet-peer-info.c
===================================================================
--- GNUnet/src/server/gnunet-peer-info.c        2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/server/gnunet-peer-info.c        2005-03-20 23:54:53 UTC (rev 
464)
@@ -36,9 +36,9 @@
 static Identity_ServiceAPI * identity;
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parser(int argc, 
+static int parser(int argc,
                  char * argv[]) {
   int cont = OK;
   int c;
@@ -62,23 +62,23 @@
       { "help",    0, 0, 'h' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
-                     "vhc:L:", 
-                     long_options, 
+                     argv,
+                     "vhc:L:",
+                     long_options,
                      &option_index);
-    
-    if (c == -1) 
+
+    if (c == -1)
       break;  /* No more flags to process */
-    
+
     switch(c) {
     case 'c':
       FREENONNULL(setConfigurationString("FILES",
                                         "gnunet.conf",
                                         GNoptarg));
       break;
-    case 'v': 
+    case 'v':
       printf("gnunet-peer-info v%s\n",
             VERSION);
       cont = SYSERR;
@@ -103,16 +103,16 @@
                                         GNoptarg));
       break;
     default:
-      LOG(LOG_FAILURE, 
+      LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
-      cont = SYSERR;    
+      cont = SYSERR;
     } /* end of parsing commandline */
   }
   if (GNoptind < argc) {
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("Invalid arguments: "));
     while (GNoptind < argc)
-      LOG(LOG_WARNING, 
+      LOG(LOG_WARNING,
          "%s ", argv[GNoptind++]);
     LOG(LOG_FATAL,
        _("Invalid arguments. Exiting.\n"));
@@ -123,9 +123,9 @@
 
 /**
  * Print information about the peer.
- * Currently prints the PeerIdentity, trust and the IP. 
+ * Currently prints the PeerIdentity, trust and the IP.
  * Could of course do more (e.g. resolve via DNS).
- */ 
+ */
 static void printHostInfo(const PeerIdentity * id,
                          const unsigned short proto,
                          int verified,
@@ -144,12 +144,12 @@
        _("Could not get address of peer '%s'.\n"),
        &enc);
     return;
-  }  
+  }
   if (SYSERR == verifySig(&helo->senderIdentity,
                          HELO_Message_size(helo) - sizeof(Signature) - 
sizeof(PublicKey) - sizeof(p2p_HEADER),
                          &helo->signature,
                          &helo->publicKey)) {
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("HELO message invalid (signature invalid).\n"));
   }
   info = transport->heloToString(helo);
@@ -160,7 +160,7 @@
        &enc);
     return;
   }
-  
+
   printf(_("Peer '%s' with trust %8u and address '%s'\n"),
         (char*)&enc,
         identity->getHostTrust(id),

Modified: GNUnet/src/server/gnunet-transport-check.c
===================================================================
--- GNUnet/src/server/gnunet-transport-check.c  2005-03-20 23:31:34 UTC (rev 
463)
+++ GNUnet/src/server/gnunet-transport-check.c  2005-03-20 23:54:53 UTC (rev 
464)
@@ -20,7 +20,7 @@
 
 /**
  * @file server/gnunet-transport-check.c
- * @brief Test for the transports.  
+ * @brief Test for the transports.
  * @author Christian Grothoff
  *
  * This utility can be used to test if a transport mechanism for
@@ -70,7 +70,7 @@
 static int noiseHandler(const PeerIdentity *peer,
                        const p2p_HEADER * msg,
                        TSession * s) {
-  if ( (ntohs(msg->size) == 
+  if ( (ntohs(msg->size) ==
        sizeof(p2p_HEADER) + expectedSize) &&
        (0 == memcmp(expectedValue,
                    &msg[1],
@@ -146,7 +146,7 @@
       SEMAPHORE_FREE(sem);
       FREE(noise);
       return;
-    } 
+    }
     addCronJob((CronJob)&semUp,
               timeout,
               0,
@@ -155,7 +155,7 @@
     suspendCron();
     delCronJob((CronJob)&semUp,
               0,
-              sem); 
+              sem);
     resumeCron();
     if (ok != YES) {
       FPRINTF(stderr,
@@ -182,7 +182,7 @@
   SEMAPHORE_FREE(sem);
   printf(_("'%s' transport OK.  It took %ums to transmit %d messages of %d 
bytes each.\n"),
         tapi->transName,
-        (unsigned int) ((end - start)/cronMILLIS),  
+        (unsigned int) ((end - start)/cronMILLIS),
         getConfigurationInt("TRANSPORT-CHECK",
                             "REPEAT"),
         expectedSize);
@@ -194,20 +194,20 @@
 }
 
 static void testPING(HELO_Message * xhelo,
-                    int * stats) {  
+                    int * stats) {
   TSession * tsession;
   HELO_Message * helo;
   HELO_Message * myHelo;
   p2p_HEADER * ping;
   char * msg;
   int len;
-  
+
   if (testConfigurationString("GNUNET-TRANSPORT-CHECK",
                              "VERBOSE",
                              "YES")) {
     char * str;
     str = transport->heloToString(xhelo);
-    fprintf(stderr, 
+    fprintf(stderr,
            _("\nContacting '%s'."),
            str);
     FREE(str);
@@ -218,7 +218,7 @@
 
   stats[0]++; /* one more seen */
   if (NO == transport->isAvailable(ntohs(helo->protocol))) {
-    fprintf(stderr, 
+    fprintf(stderr,
            " Transport %d not available\n",
            ntohs(helo->protocol));
     FREE(helo);
@@ -232,23 +232,23 @@
   }
   if (testConfigurationString("GNUNET-TRANSPORT-CHECK",
                              "VERBOSE",
-                             "YES")) 
+                             "YES"))
     fprintf(stderr, ".");
 
   stats[1]++; /* one more with transport 'available' */
   tsession = NULL;
-  if (OK != transport->connect(helo, 
+  if (OK != transport->connect(helo,
                               &tsession)) {
     FREE(helo);
-    fprintf(stderr, 
+    fprintf(stderr,
            " Connection failed\n");
     return;
   }
   if (testConfigurationString("GNUNET-TRANSPORT-CHECK",
                              "VERBOSE",
-                             "YES")) 
+                             "YES"))
     fprintf(stderr, ".");
-  
+
   sem = SEMAPHORE_NEW(0);
 
   ping = pingpong->pingUser(&helo->senderIdentity,
@@ -262,7 +262,7 @@
         ntohs(myHelo->header.size));
   memcpy(&msg[ntohs(myHelo->header.size)],
         ping,
-        ntohs(ping->size));  
+        ntohs(ping->size));
   FREE(myHelo);
   FREE(ping);
   /* send ping */
@@ -270,7 +270,7 @@
   if (OK != transport->send(tsession,
                            msg,
                            len)) {
-    fprintf(stderr, 
+    fprintf(stderr,
            "Send failed.\n");
     FREE(msg);
     transport->disconnect(tsession);
@@ -279,7 +279,7 @@
   FREE(msg);
   if (testConfigurationString("GNUNET-TRANSPORT-CHECK",
                              "VERBOSE",
-                             "YES")) 
+                             "YES"))
     fprintf(stderr, ".");
   /* check: received pong? */
   terminate = NO;
@@ -288,29 +288,29 @@
             5 * cronSECONDS,
             sem);
   SEMAPHORE_DOWN(sem);
-  
+
   if (testConfigurationString("GNUNET-TRANSPORT-CHECK",
                              "VERBOSE",
                              "YES")) {
     if (ok != YES)
-      FPRINTF(stderr, 
+      FPRINTF(stderr,
              _("No reply received within %llums.\n"),
              timeout);
   }
   suspendCron();
   delCronJob((CronJob)&semUp,
             5 * cronSECONDS,
-            sem); 
+            sem);
   resumeCron();
   SEMAPHORE_FREE(sem);
   sem = NULL;
-  transport->disconnect(tsession);  
+  transport->disconnect(tsession);
 }
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parser(int argc, 
+static int parser(int argc,
                  char * argv[]) {
   int cont = OK;
   int c;
@@ -343,18 +343,18 @@
       { "verbose", 0, 0, 'V' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
-                     "vhc:L:t:r:s:X:P:pVT:", 
-                     long_options, 
+                     argv,
+                     "vhc:L:t:r:s:X:P:pVT:",
+                     long_options,
                      &option_index);
-    
-    if (c == -1) 
+
+    if (c == -1)
       break;  /* No more flags to process */
-    
+
     switch(c) {
-    case 'p': 
+    case 'p':
       FREENONNULL(setConfigurationString("TRANSPORT-CHECK",
                                         "PING",
                                         "YES"));
@@ -362,7 +362,7 @@
     case 'P':{
       unsigned int port;
       if (1 != sscanf(GNoptarg, "%ud", &port)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            "You must pass a number to the -P option.\n");
        return SYSERR;
       } else {
@@ -377,7 +377,7 @@
     case 's':{
       unsigned int size;
       if (1 != sscanf(GNoptarg, "%ud", &size)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-s");
        return SYSERR;
@@ -397,7 +397,7 @@
     case 'r':{
       unsigned int repeat;
       if (1 != sscanf(GNoptarg, "%ud", &repeat)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-r");
        return SYSERR;
@@ -411,7 +411,7 @@
     case 'X':{
       unsigned int repeat;
       if (1 != sscanf(GNoptarg, "%ud", &repeat)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-X");
        return SYSERR;
@@ -424,7 +424,7 @@
     }
     case 'T':{
       if (1 != SSCANF(GNoptarg, "%llu", &timeout)) {
-       LOG(LOG_FAILURE, 
+       LOG(LOG_FAILURE,
            _("You must pass a number to the '%s' option.\n"),
            "-T");
        return SYSERR;
@@ -441,7 +441,7 @@
                                         "TRANSPORTS",
                                         GNoptarg));
       break;
-    case 'v': 
+    case 'v':
       printf("gnunet-transport-check v%s\n",
             VERSION);
       cont = SYSERR;
@@ -472,7 +472,7 @@
       };
       formatHelp("gnunet-transport-check [OPTIONS]",
                 _("Tool to test if GNUnet transport services are 
operational."),
-                help);  
+                help);
       cont = SYSERR;
       break;
     }
@@ -482,16 +482,16 @@
                                         GNoptarg));
       break;
     default:
-      LOG(LOG_FAILURE, 
+      LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
-      cont = SYSERR;    
+      cont = SYSERR;
     } /* end of parsing commandline */
   }
   if (GNoptind < argc) {
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("Invalid arguments: "));
     while (GNoptind < argc)
-      LOG(LOG_WARNING, 
+      LOG(LOG_WARNING,
          "%s ", argv[GNoptind++]);
     LOG(LOG_FATAL,
        _("Invalid arguments. Exiting.\n"));
@@ -577,9 +577,9 @@
           stats[0] - stats[1]);
     releaseService(bootstrap);
   } else {
-    while (Xrepeat-- > 0) 
+    while (Xrepeat-- > 0)
       transport->forEach((TransportCallback)&testTAPI,
-                        &res);  
+                        &res);
   }
   stopCron();
   releaseService(identity);

Modified: GNUnet/src/server/gnunet-update.c
===================================================================
--- GNUnet/src/server/gnunet-update.c   2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/server/gnunet-update.c   2005-03-20 23:54:53 UTC (rev 464)
@@ -33,7 +33,7 @@
 /**
  * We may want to change this at some point into
  * something like libgnunet_update if we want to
- * separate the update code from the codebase 
+ * separate the update code from the codebase
  * used in normal operation -- but currently I
  * see no need / use for that.
  */
@@ -63,9 +63,9 @@
 static int be_verbose = NO;
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   int c;
   int user = NO;
@@ -87,16 +87,16 @@
       { "verbose", 0, 0, 'V' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
-                     "vhdc:g:VL:", 
-                     long_options, 
-                     &option_index);    
-    if (c == -1) 
+                     argv,
+                     "vhdc:g:VL:",
+                     long_options,
+                     &option_index);
+    if (c == -1)
       break;  /* No more flags to process */
     if (YES == parseDefaultOptions(c, GNoptarg))
-      continue;    
+      continue;
     switch(c) {
     case 'g':
       FREENONNULL(setConfigurationString("GNUNET-UPDATE",
@@ -109,8 +109,8 @@
                                         "LOGLEVEL",
                                         GNoptarg));
      break;
-    case 'h': 
-      printhelp(); 
+    case 'h':
+      printhelp();
       return SYSERR;
     case 'u':
       FREENONNULL(setConfigurationString("GNUNETD",
@@ -118,7 +118,7 @@
                                         "NO"));
       user = YES;
       break;
-    case 'v': 
+    case 'v':
       printf("GNUnet v%s, gnunet-update 0.0.1\n",
             VERSION);
       return SYSERR;
@@ -144,7 +144,7 @@
   }
   if (get == NO) {
     /* if we do not run in 'get' mode,
-       make sure we send error messages 
+       make sure we send error messages
        to the console... */
     FREENONNULL(setConfigurationString("GNUNETD",
                                       "LOGFILE",
@@ -160,7 +160,7 @@
 /**
  * Allow the module named "pos" to update.
  * @return OK on success, SYSERR on error
- */ 
+ */
 static int updateModule(const char * rpos) {
   UpdateMethod mptr;
   void * library;
@@ -186,7 +186,7 @@
   library = loadDynamicLibrary(DSO_PREFIX,
                               name);
   if (library == NULL) {
-    FREE(name);    
+    FREE(name);
     return SYSERR;
   }
   mptr = trybindDynamicMethod(library,
@@ -210,7 +210,7 @@
   char * dso;
   char * next;
   char * pos;
-  
+
   dso = getConfigurationString("GNUNETD",
                               "APPLICATIONS");
   if (dso == NULL) {
@@ -247,7 +247,7 @@
   char * sec;
   char * ent;
   char * val;
-  
+
   sec = get;
   ent = get;
   while ( ( (*ent) != ':') &&
@@ -258,14 +258,14 @@
     ent++;
   }
   val = getConfigurationString(sec, ent);
-  if (val == NULL) 
+  if (val == NULL)
     printf("%u\n",
           getConfigurationInt(sec, ent));
   else {
     printf("%s\n",
           val);
     FREE(val);
-  }    
+  }
   FREE(get);
 }
 
@@ -293,20 +293,20 @@
   if (be_verbose)
     printf(_("Updated data for %d applications.\n"),
           processedCount);
-  GROW(processed, processedCount, 0); 
+  GROW(processed, processedCount, 0);
 
   doneCore();
 }
 
-int main(int argc, 
+int main(int argc,
         char * argv[]) {
   char * get;
 
-  if (SYSERR == initUtil(argc, argv, &parseCommandLine))    
+  if (SYSERR == initUtil(argc, argv, &parseCommandLine))
     return 0;
   get = getConfigurationString("GNUNET-UPDATE",
                               "GET");
-  if (get != NULL) 
+  if (get != NULL)
     doGet(get);
   else
     work();

Modified: GNUnet/src/server/gnunetd.c
===================================================================
--- GNUnet/src/server/gnunetd.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/server/gnunetd.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -1,4 +1,4 @@
-/* 
+/*
      This file is part of GNUnet.
      (C) 2001, 2002, 2004 Christian Grothoff (and other contributing authors)
 
@@ -73,15 +73,15 @@
   theServiceStatus.dwServiceType = SERVICE_WIN32;
   theServiceStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP;
   theServiceStatus.dwCurrentState = SERVICE_RUNNING;
-  
+
   hService = GNRegisterServiceCtrlHandler("GNUnet", ServiceCtrlHandler);
   if (! hService)
     return;
-    
+
   GNSetServiceStatus(hService, &theServiceStatus);
-  
+
   gnunet_main();
-  
+
   theServiceStatus.dwCurrentState = SERVICE_STOPPED;
   GNSetServiceStatus(hService, &theServiceStatus);
 }
@@ -104,25 +104,25 @@
   /* init 1: version management for GNUnet core,
      essentially forces running gnunet-update
      whenever the version OR configuration changes. */
-  if (OK != checkUpToDate()) 
+  if (OK != checkUpToDate())
     errexit(_("Configuration or GNUnet version changed.  You need to run 
'%s'!\n"),
            "gnunet-update");
-  
+
   /* init 2: become deamon, initialize core subsystems */
-  if (NO == debug_flag) 
-    detachFromTerminal(filedes);  
+  if (NO == debug_flag)
+    detachFromTerminal(filedes);
 
   LOG(LOG_MESSAGE,
       _("'%s' starting\n"),
       "gnunetd");
 
-  initCore(); 
+  initCore();
   initConnection();   /* requires core, starts transports! */
   loadApplicationModules(); /* still single-threaded! */
 
   /* initialize signal handler (CTRL-C / SIGTERM) */
-  if (NO == debug_flag) 
-    detachFromTerminalComplete(filedes);  
+  if (NO == debug_flag)
+    detachFromTerminalComplete(filedes);
   writePIDFile();
 
   startCron();
@@ -137,20 +137,20 @@
   LOG(LOG_MESSAGE,
       _("'%s' startup complete.\n"),
       "gnunetd");
-  
+
   waitForSignalHandler();
   LOG(LOG_MESSAGE,
       _("'%s' is shutting down.\n"),
       "gnunetd");
 
-  /* init 5: shutdown */   
+  /* init 5: shutdown */
   disableCoreProcessing(); /* calls on applications! */
   stopCron(); /* avoid concurrency! */
   stopTCPServer(); /* calls on applications! */
   unloadApplicationModules(); /* requires connection+tcpserver+handler */
 
   doneConnection();  /* requires core, stops transports! */
-  doneCore(); 
+  doneCore();
 
   /* init 6: goodbye */
   deletePIDFile();
@@ -174,14 +174,14 @@
     SERVICE_TABLE_ENTRY DispatchTable[] =
       {{"GNUnet", ServiceMain}, {NULL, NULL}};
     GNStartServiceCtrlDispatcher(DispatchTable);
-    
+
     return 0;
   } else
 #endif
     gnunet_main();
 
   return 0;
-} 
+}
 
 /* You have reached the end of GNUnet. You can shutdown your
    computer and get a life now. */

Modified: GNUnet/src/server/handler.c
===================================================================
--- GNUnet/src/server/handler.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/server/handler.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -42,7 +42,7 @@
 #define QUEUE_LENGTH 16
 
 /**
- * How many threads do we start? 
+ * How many threads do we start?
  */
 #define THREAD_COUNT 2
 
@@ -64,7 +64,7 @@
 static int threads_running = NO;
 
 static Semaphore * bufferQueueRead_;
-static Semaphore * bufferQueueWrite_;   
+static Semaphore * bufferQueueWrite_;
 static Mutex globalLock_;
 static Semaphore * mainShutdownSignal = NULL;
 static PTHREAD_T threads_[THREAD_COUNT];
@@ -114,7 +114,7 @@
 int registerp2pHandler(const unsigned short type,
                       MessagePartHandler callback) {
   int last;
- 
+
   MUTEX_LOCK(&handlerLock);
   if (threads_running == YES) {
     BREAK();
@@ -140,9 +140,9 @@
   GROW(handlers[type], last, last+1);
   handlers[type][last-2] = callback;
   MUTEX_UNLOCK(&handlerLock);
-  return OK;    
+  return OK;
 }
-  
+
 /**
  * Unregister a method as a handler for specific message types. Only
  * for encrypted messages!
@@ -184,9 +184,9 @@
       MUTEX_UNLOCK(&handlerLock);
       return OK;
     }
-  } 
+  }
   MUTEX_UNLOCK(&handlerLock);
-  return SYSERR; 
+  return SYSERR;
 }
 
 /**
@@ -205,7 +205,7 @@
 int registerPlaintextHandler(const unsigned short type,
                             PlaintextMessagePartHandler callback) {
   int last;
- 
+
   MUTEX_LOCK(&handlerLock);
   if (threads_running == YES) {
     MUTEX_UNLOCK(&handlerLock);
@@ -231,9 +231,9 @@
   GROW(plaintextHandlers[type], last, last+1);
   plaintextHandlers[type][last-2] = callback;
   MUTEX_UNLOCK(&handlerLock);
-  return OK;    
+  return OK;
 }
-  
+
 /**
  * Unregister a method as a handler for specific message types. Only
  * for plaintext messages!
@@ -275,9 +275,9 @@
       MUTEX_UNLOCK(&handlerLock);
       return OK;
     }
-  } 
+  }
   MUTEX_UNLOCK(&handlerLock);
-  return SYSERR; 
+  return SYSERR;
 }
 
 
@@ -286,7 +286,7 @@
  * Processes the message by calling the registered
  * handler for each message part.
  *
- * @param encrypted YES if it was encrypted, 
+ * @param encrypted YES if it was encrypted,
  *    NO if plaintext,
  * @param session NULL if not available
  */
@@ -315,10 +315,10 @@
     if (pos + plen > size) {
       IFLOG(LOG_WARNING,
            hash2enc(&sender->hashPubKey,
-                    &enc));      
-      LOG(LOG_WARNING, 
+                    &enc));
+      LOG(LOG_WARNING,
          _("Received corrupt message from peer '%s'in %s:%d.\n"),
-         &enc, 
+         &enc,
          __FILE__, __LINE__);
       return;
     }
@@ -342,10 +342,10 @@
     ptyp = htons(part->type);
     if (YES == wasEncrypted) {
       MessagePartHandler callback;
-      
+
       if ( (ptyp >= max_registeredType) ||
           (NULL == handlers[ptyp][0]) ) {
-       LOG(LOG_DEBUG, 
+       LOG(LOG_DEBUG,
            "Encrypted message of type '%d' not understood (no handler 
registered).\n",
            ptyp);
        continue; /* no handler registered, go to next part */
@@ -363,10 +363,10 @@
       }
     } else { /* isEncrypted == NO */
       PlaintextMessagePartHandler callback;
-      
+
       if ( (ptyp >= plaintextmax_registeredType) ||
           (NULL == plaintextHandlers[ptyp][0]) ) {
-       LOG(LOG_DEBUG, 
+       LOG(LOG_DEBUG,
            "Plaintext message of type '%d' not understood (no handler 
registered).\n",
            ptyp);
        continue; /* no handler registered, go to next part */
@@ -400,7 +400,7 @@
 static void handleMessage(TSession * tsession,
                          const PeerIdentity * sender,
                          const char * msg,
-                         const unsigned int size) { 
+                         const unsigned int size) {
   int ret;
 
   if (YES == identity->isBlacklistedStrict(sender) ) {
@@ -425,7 +425,7 @@
                &msg[sizeof(P2P_Message)],
                size - sizeof(P2P_Message),
                ret,
-               tsession);  
+               tsession);
 }
 
 /**
@@ -435,7 +435,7 @@
  */
 static void * threadMain(int id) {
   MessagePack * mp;
-  
+
   while (mainShutdownSignal == NULL) {
     SEMAPHORE_DOWN(bufferQueueRead_);
     /* handle buffer entry */
@@ -451,9 +451,9 @@
       bq_lastFree_ = 0;
     MUTEX_UNLOCK(&globalLock_);
     /* end of sync */
-    SEMAPHORE_UP(bufferQueueWrite_);    
+    SEMAPHORE_UP(bufferQueueWrite_);
 
-    /* handle buffer - now out of sync */    
+    /* handle buffer - now out of sync */
     handleMessage(mp->tsession,
                  &mp->sender,
                  mp->msg,
@@ -478,17 +478,17 @@
     FREE(mp->msg);
     FREE(mp);
     return;
-  } 
+  }
   /* aquire buffer */
   if (SYSERR == transport->associate(mp->tsession))
     mp->tsession = NULL;
-  
+
   MUTEX_LOCK(&globalLock_);
   if (bq_firstFree_ == QUEUE_LENGTH)
     bq_firstFree_ = 0;
-  bufferQueue_[bq_firstFree_++] = mp;    
+  bufferQueue_[bq_firstFree_++] = mp;
   MUTEX_UNLOCK(&globalLock_);
-  SEMAPHORE_UP(bufferQueueRead_);  
+  SEMAPHORE_UP(bufferQueueRead_);
 }
 
 /**
@@ -503,16 +503,16 @@
   bq_firstFree_ = 0;
   bq_lastFree_ = 0;
   bq_firstFull_ = 0;
-  
+
   /* create message handling threads */
   MUTEX_LOCK(&handlerLock);
   threads_running = YES;
   MUTEX_UNLOCK(&handlerLock);
   for (i=0;i<THREAD_COUNT;i++) {
-    PTHREAD_CREATE(&threads_[i], 
+    PTHREAD_CREATE(&threads_[i],
                   (PThreadMain) &threadMain,
                   (void *) &i,
-                  8 * 1024); 
+                  8 * 1024);
   }
 }
 
@@ -529,7 +529,7 @@
     SEMAPHORE_UP(bufferQueueRead_);
     SEMAPHORE_DOWN(mainShutdownSignal);
   }
-  for (i=0;i<THREAD_COUNT;i++) 
+  for (i=0;i<THREAD_COUNT;i++)
     PTHREAD_JOIN(&threads_[i], &unused);
   MUTEX_LOCK(&handlerLock);
   threads_running = NO;
@@ -543,7 +543,7 @@
  * Initialize message handling module.
  */
 void initHandler() {
-  MUTEX_CREATE(&handlerLock); 
+  MUTEX_CREATE(&handlerLock);
   transport = requestService("transport");
   GNUNET_ASSERT(transport != NULL);
   identity  = requestService("identity");

Modified: GNUnet/src/server/handler.h
===================================================================
--- GNUnet/src/server/handler.h 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/server/handler.h 2005-03-20 23:54:53 UTC (rev 464)
@@ -54,11 +54,11 @@
  * Handle a message (that was decrypted if needed).  Processes the
  * message by calling the registered handler for each message part.
  *
- * @param wasEncrypted YES if it was encrypted, 
+ * @param wasEncrypted YES if it was encrypted,
  *                     NO if plaintext,
  */
 void injectMessage(const PeerIdentity * sender,
-                  const char * msg,               
+                  const char * msg,            
                   unsigned int size,
                   int wasEncrypted,
                   TSession * session);
@@ -72,7 +72,7 @@
 
 /**
  * Register a method as a handler for specific message
- * types. 
+ * types.
  * @param type the message type
  * @param callback the method to call if a message of
  *        that type is received, if the callback returns
@@ -82,7 +82,7 @@
  *         handler for that type
  */
 int registerp2pHandler(const unsigned short type,
-                      MessagePartHandler callback); 
+                      MessagePartHandler callback);
 
 
 /**

Modified: GNUnet/src/server/startup.c
===================================================================
--- GNUnet/src/server/startup.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/server/startup.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -66,11 +66,11 @@
 
 /**
  * Signal handler for SIGHUP.
- * Re-reads the configuration file. 
+ * Re-reads the configuration file.
  */
 static void reread_config(int signum) {
   addCronJob(&reread_config_helper,
-            1 * cronSECONDS, 
+            1 * cronSECONDS,
             0,
             NULL);
 }
@@ -79,7 +79,7 @@
  * Try a propper shutdown of gnunetd.
  */
 static void shutdown_gnunetd(int signum) {
-  
+
 #ifdef MINGW
 if (win_service)
 {
@@ -89,7 +89,7 @@
   if (signum != SERVICE_CONTROL_STOP)
   {
     SERVICE_STATUS theStat;
-    
+
     /* Init proper shutdown through the SCM */
     if (GNControlService(hService, SERVICE_CONTROL_STOP, &theStat))
     {
@@ -104,7 +104,7 @@
        but we don't care.
        Just shut the gnunetd process down. */
   }
-  
+
   /* Acknowledge the shutdown request */
   theServiceStatus.dwCurrentState = SERVICE_STOP_PENDING;
   GNSetServiceStatus(hService, &theServiceStatus);
@@ -117,16 +117,16 @@
 static int shutdownHandler(ClientHandle client,
                            const CS_HEADER * msg) {
   int ret;
-  
+
   if (ntohs(msg->size) != sizeof(CS_HEADER)) {
     LOG(LOG_WARNING,
         _("The '%s' request received from client is malformed.\n"),
        "shutdown");
     return SYSERR;
   }
-  LOG(LOG_INFO, 
+  LOG(LOG_INFO,
       "shutdown request accepted from client\n");
-  
+
   if (SYSERR == unregisterCSHandler(CS_PROTO_SHUTDOWN_REQUEST,
                                     &shutdownHandler))
     GNUNET_ASSERT(0);
@@ -148,7 +148,7 @@
     case SERVICE_CONTROL_STOP:
       shutdown_gnunetd(dwCtrlType);
   }
-  
+
   return TRUE;
 }
 #endif
@@ -171,11 +171,11 @@
   sig.sa_flags = SA_INTERRUPT; /* SunOS */
 #else
   sig.sa_flags = SA_RESTART;
-#endif    
+#endif
   sigaction(SIGINT,  &sig, &oldsig);
   sigaction(SIGTERM, &sig, &oldsig);
   sigaction(SIGQUIT, &sig, &oldsig);
-  
+
   sig.sa_handler = &reread_config;
   sigaction(SIGHUP, &sig, &oldsig);
 #else
@@ -205,7 +205,7 @@
 #else
   SetConsoleCtrlHandler(&win_shutdown_gnunetd, TRUE);
 #endif
-  SEMAPHORE_FREE(doShutdown);  
+  SEMAPHORE_FREE(doShutdown);
 }
 
 /**
@@ -228,16 +228,16 @@
               0,
               doShutdown);
 #if 0
-  /* If Valgrind is used to debug memory leaks, some sort of mechanism 
-     is needed to make gnunetd exit without using any signal -IW*/ 
+  /* If Valgrind is used to debug memory leaks, some sort of mechanism
+     is needed to make gnunetd exit without using any signal -IW*/
   FILE *fp;
-  
+
   while(1) {
     fp=FOPEN("/tmp/quitgn", "r");
     if(fp) {
       fprintf(stderr, "QUITTING...\n");
       fclose(fp);
-      return;  
+      return;
     }
     sleep(1);
   }
@@ -275,12 +275,12 @@
 void writePIDFile() {
   FILE * pidfd;
   char * pif;
-  
+
   pif = getPIDFile();
   pidfd = FOPEN(pif, "w");
   if (pidfd == NULL) {
-    LOG(LOG_WARNING, 
-       _("Could not write PID to file '%s': %s.\n"), 
+    LOG(LOG_WARNING,
+       _("Could not write PID to file '%s': %s.\n"),
        pif,
        STRERROR(errno));
   } else {
@@ -292,7 +292,7 @@
 
 void deletePIDFile() {
   char * pif = getPIDFile();
-  UNLINK(pif);    
+  UNLINK(pif);
   FREE(pif);
 }
 
@@ -310,7 +310,7 @@
   pid_t pid;
   int nullfd;
 #endif
-  
+
   /* Don't hold the wrong FS mounted */
   if (CHDIR("/") < 0) {
     perror("chdir");
@@ -327,16 +327,16 @@
   if (pid) {  /* Parent */
     int ok;
     char c;
-    
+
     CLOSE(filedes[1]); /* we only read */
     ok = SYSERR;
     while (0 < READ(filedes[0], &c, sizeof(char))) {
-      if (c == '.') 
+      if (c == '.')
        ok = OK;
-    }      
+    }
     fflush(stdout);
     if (ok == OK)
-      exit(0);   
+      exit(0);
     else
       exit(1); /* child reported error */
   }
@@ -346,13 +346,13 @@
   if (nullfd < 0) {
     perror("/dev/null");
     exit(1);
-  }   
+  }
   /* child - close fds linking to invoking terminal, but
    * close usual incoming fds, but redirect them somewhere
    * useful so the fds don't get reallocated elsewhere.
    */
-  if (dup2(nullfd,0) < 0 || 
-      dup2(nullfd,1) < 0 || 
+  if (dup2(nullfd,0) < 0 ||
+      dup2(nullfd,1) < 0 ||
       dup2(nullfd,2) < 0) {
     perror("dup2"); /* Should never happen */
     exit(1);
@@ -401,16 +401,16 @@
 
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-int parseCommandLine(int argc, 
+int parseCommandLine(int argc,
                     char * argv[]) {
   int cont = OK;
   int c;
 #ifndef MINGW
   struct passwd * pws;
 #endif
-  
+
   /* set the 'magic' code that indicates that
      this process is 'gnunetd' (and not any of
      the tools).  This can be used by code
@@ -424,7 +424,7 @@
     static struct GNoption long_options[] = {
       { "loglevel",1, 0, 'L' },
       { "config",  1, 0, 'c' },
-      { "version", 0, 0, 'v' },      
+      { "version", 0, 0, 'v' },
       { "help",    0, 0, 'h' },
       { "user",    1, 0, 'u' },
       { "debug",   0, 0, 'd' },
@@ -433,40 +433,40 @@
       { "win-service", 0, 0, '@' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
-                     "vhdc:u:L:lp:@", 
-                     long_options, 
+                     argv,
+                     "vhdc:u:L:lp:@",
+                     long_options,
                      &option_index);
-    
-    if (c == -1) 
+
+    if (c == -1)
       break;  /* No more flags to process */
-    
+
     switch(c) {
     case 'p':
       FREENONNULL(setConfigurationString("GNUNETD-EXPERIMENTAL",
                                         "PADDING",
                                         GNoptarg));
-      break;      
+      break;
     case 'l':
       addCronJob(&printDot,
-                1 * cronSECONDS, 
-                1 * cronSECONDS, 
+                1 * cronSECONDS,
+                1 * cronSECONDS,
                 NULL);
       break;
-    case 'c': 
+    case 'c':
       FREENONNULL(setConfigurationString("FILES",
                                         "gnunet.conf",
                                         GNoptarg));
       break;
-    case 'v': 
+    case 'v':
       printf("GNUnet v%s\n",
             VERSION);
       cont = SYSERR;
       break;
-    case 'h': 
-      printhelp(); 
+    case 'h':
+      printhelp();
       cont = SYSERR;
       break;
     case 'L':
@@ -484,7 +484,7 @@
     case 'u':
       pws = getpwnam(GNoptarg);
       if (pws == NULL) {
-        LOG(LOG_WARNING, 
+        LOG(LOG_WARNING,
            _("User '%s' not known, cannot change UID to it."),
            GNoptarg);
         break;
@@ -492,10 +492,10 @@
       if ( (0 != setgid(pws->pw_gid)) ||
           (0 != setegid(pws->pw_gid)) ||
           (0 != setuid(pws->pw_uid)) ||
-          (0 != seteuid(pws->pw_uid)) ) {  
-       if ( (0 != setregid(pws->pw_gid, pws->pw_gid)) || 
+          (0 != seteuid(pws->pw_uid)) ) {
+       if ( (0 != setregid(pws->pw_gid, pws->pw_gid)) ||
             (0 != setreuid(pws->pw_uid, pws->pw_uid)) )
-         LOG(LOG_WARNING, 
+         LOG(LOG_WARNING,
              _("Cannot change user/group to '%s': %s"),
              GNoptarg,
              STRERROR(errno));
@@ -508,21 +508,21 @@
       break;
 #endif
     default:
-      LOG(LOG_FAILURE, 
+      LOG(LOG_FAILURE,
          _("Use --help to get a list of options.\n"));
-      cont = SYSERR;    
+      cont = SYSERR;
     } /* end of parsing commandline */
   }
   if (GNoptind < argc) {
-    LOG(LOG_WARNING, 
+    LOG(LOG_WARNING,
        _("Invalid command-line arguments:\n"));
     while (GNoptind < argc) {
-      LOG(LOG_WARNING, 
-         _("Argument %d: '%s'\n"), 
+      LOG(LOG_WARNING,
+         _("Argument %d: '%s'\n"),
          GNoptind+1,
          argv[GNoptind]);
       GNoptind++;
-    }    
+    }
     LOG(LOG_FATAL,
        _("Invalid command-line arguments.\n"));
     return SYSERR;

Modified: GNUnet/src/server/startup.h
===================================================================
--- GNUnet/src/server/startup.h 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/server/startup.h 2005-03-20 23:54:53 UTC (rev 464)
@@ -40,9 +40,9 @@
 void checkCompiler();
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  **/
-int parseCommandLine(int argc, 
+int parseCommandLine(int argc,
                     char * argv[]);
 
 /**
@@ -53,7 +53,7 @@
 void doneSignalHandlers();
 
 void waitForSignalHandler();
- 
+
 /**
  * Fork and start a new session to go into the background
  * in the way a good deamon should.
@@ -89,5 +89,5 @@
 BOOL WINAPI win_shutdown_gnunetd(DWORD dwCtrlType);
 #endif
 
-#endif 
+#endif
 /* end of startup.h */

Modified: GNUnet/src/server/tcpserver.c
===================================================================
--- GNUnet/src/server/tcpserver.c       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/server/tcpserver.c       2005-03-20 23:54:53 UTC (rev 464)
@@ -135,12 +135,12 @@
   LOG(LOG_DEBUG,
       "signaling select.\n");
 #endif
-  ret = WRITE(signalingPipe[1], 
-             &i, 
+  ret = WRITE(signalingPipe[1],
+             &i,
              sizeof(char));
-  if (ret != sizeof(char)) 
+  if (ret != sizeof(char))
     if (errno != EAGAIN)
-      LOG_STRERROR(LOG_ERROR, "write");  
+      LOG_STRERROR(LOG_ERROR, "write");
 }
 
 int registerClientExitHandler(ClientExitHandler callback) {
@@ -173,8 +173,8 @@
      releasing the lock here is safe. */
   MUTEX_UNLOCK(&clientlock);
   MUTEX_LOCK(&handlerlock);
-  for (i=0;i<exitHandlerCount;i++) 
-    exitHandlers[i](session);  
+  for (i=0;i<exitHandlerCount;i++)
+    exitHandlers[i](session);
   MUTEX_UNLOCK(&handlerlock);
   MUTEX_LOCK(&clientlock);
   prev = NULL;
@@ -202,7 +202,7 @@
        0);
   FREE(session);
 }
-  
+
 int unregisterClientExitHandler(ClientExitHandler callback) {
   int i;
 
@@ -268,17 +268,17 @@
   ptyp = htons(msg->type);
   MUTEX_LOCK(&handlerlock);
   if (ptyp >= max_registeredType) {
-    LOG(LOG_INFO, 
+    LOG(LOG_INFO,
        "%s: Message of type %d not understood: no handler registered\n",
        __FUNCTION__,
-       ptyp, 
+       ptyp,
        max_registeredType);
     MUTEX_UNLOCK(&handlerlock);
     return SYSERR;
   }
   callback = handlers[ptyp];
   if (callback == NULL) {
-    LOG(LOG_INFO, 
+    LOG(LOG_INFO,
        "%s: Message of type %d not understood: no handler registered\n",
        __FUNCTION__,
        ptyp);
@@ -288,7 +288,7 @@
     if (OK != callback(sender,
                       msg)) {
       MUTEX_UNLOCK(&handlerlock);
-      return SYSERR;      
+      return SYSERR;
     }
   }
   MUTEX_UNLOCK(&handlerlock);
@@ -299,7 +299,7 @@
  * Handle data available on the TCP socket descriptor. This method
  * first aquires a slot to register this socket for the writeBack
  * method (@see writeBack) and then demultiplexes all TCP traffic
- * received to the appropriate handlers.  
+ * received to the appropriate handlers.
  * @param sockDescriptor the socket that we are listening to (fresh)
  */
 static int readAndProcess(ClientHandle handle) {
@@ -331,7 +331,7 @@
 #endif
   if (ret < 0) {
     if ( (errno == EINTR) ||
-        (errno == EAGAIN) ) 
+        (errno == EAGAIN) )
       return OK;
     LOG_STRERROR(LOG_WARNING, "read");
     return SYSERR;
@@ -352,8 +352,8 @@
       GROW(handle->readBuffer,
           handle->readBufferSize,
           len);
-    if (handle->readBufferPos < len) 
-      return OK;  
+    if (handle->readBufferPos < len)
+      return OK;
     /* avoid deadlock: give up the lock while
        the client is processing; since only (!) the
        select-thread can possibly free handle/readbuffer,
@@ -390,7 +390,7 @@
   fd_set writeSet;
   int success;
 
-  listenerPort = getGNUnetPort(); 
+  listenerPort = getGNUnetPort();
   /* create the socket */
  CREATE_SOCKET:
   while ( (listenerFD = SOCKET(PF_INET,
@@ -399,32 +399,32 @@
     LOG_STRERROR(LOG_ERROR, "socket");
     sleep(30);
   }
-  
+
   /* fill in the inet address structure */
   memset((char *) &serverAddr,
         0,
         sizeof(serverAddr));
-  serverAddr.sin_family 
+  serverAddr.sin_family
     = AF_INET;
   serverAddr.sin_addr.s_addr
     = htonl(INADDR_ANY);
   serverAddr.sin_port
     = htons(listenerPort);
- 
-  if ( SETSOCKOPT(listenerFD, 
-                 SOL_SOCKET, 
-                 SO_REUSEADDR, 
+
+  if ( SETSOCKOPT(listenerFD,
+                 SOL_SOCKET,
+                 SO_REUSEADDR,
                  &on, sizeof(on)) < 0 )
     LOG_STRERROR(LOG_ERROR, "setsockopt");
 
   /* bind the socket */
-  if (BIND(listenerFD, 
+  if (BIND(listenerFD,
           (struct sockaddr *) &serverAddr,
-          sizeof(serverAddr)) < 0) {    
-    LOG(LOG_ERROR, 
+          sizeof(serverAddr)) < 0) {
+    LOG(LOG_ERROR,
        _("'%s' failed for port %d: %s. Will try again in %d seconds.\n"),
        "bind",
-       listenerPort, 
+       listenerPort,
        STRERROR(errno),
        secs);
     sleep(secs);
@@ -432,10 +432,10 @@
     CLOSE(listenerFD);
     goto CREATE_SOCKET;
   }
-  
+
   /* start listening for new connections */
   LISTEN(listenerFD, 5); /* max: 5 pending, unhandled connections */
-  SEMAPHORE_UP(serverSignal); 
+  SEMAPHORE_UP(serverSignal);
 
   MUTEX_LOCK(&clientlock);
   /* process incoming data */
@@ -462,7 +462,7 @@
       if (-1 != FSTAT(sock, &buf)) {
        FD_SET(sock, &errorSet);
        if ( (pos->writeBufferSize > 0) ||
-            (pos->writeQueueSize > 0) ) 
+            (pos->writeQueueSize > 0) )
          FD_SET(sock, &writeSet); /* we have a pending write request? */
        else
          FD_SET(sock, &readSet); /* ONLY read if no writes are pending! */
@@ -478,17 +478,17 @@
        continue;
       }
       pos = pos->next;
-    }  
+    }
     MUTEX_UNLOCK(&clientlock);
-    ret = SELECT(max+1, 
+    ret = SELECT(max+1,
                 &readSet,
                 &writeSet,
                 &errorSet,
-                NULL);    
+                NULL);
     MUTEX_LOCK(&clientlock);
     if ( (ret == -1) &&
-        ( (errno == EAGAIN) || (errno == EINTR) ) ) 
-      continue;    
+        ( (errno == EAGAIN) || (errno == EINTR) ) )
+      continue;
     if (ret == -1) {
       if (errno == EBADF) {
        LOG_STRERROR(LOG_ERROR, "select");
@@ -498,15 +498,15 @@
     }
     if (FD_ISSET(listenerFD, &readSet)) {
       int sock;
-      
+
       lenOfIncomingAddr = sizeof(clientAddr);
-      sock = ACCEPT(listenerFD, 
-                   (struct sockaddr *)&clientAddr, 
+      sock = ACCEPT(listenerFD,
+                   (struct sockaddr *)&clientAddr,
                    &lenOfIncomingAddr);
-      if (sock != -1) {          
+      if (sock != -1) {        
        /* verify clientAddr for eligibility here (ipcheck-style,
           user should be able to specify who is allowed to connect,
-          otherwise we just close and reject the communication! */  
+          otherwise we just close and reject the communication! */
 
        IPaddr ipaddr;
        GNUNET_ASSERT(sizeof(struct in_addr) == sizeof(IPaddr));
@@ -543,7 +543,7 @@
        LOG_STRERROR(LOG_INFO, "accept");
       }
     }
-    
+
     if (FD_ISSET(signalingPipe[0], &readSet)) {
       /* allow reading multiple signals in one go in case we get many
         in one shot... */
@@ -556,10 +556,10 @@
          "tcpserver eats signal.\n");
 #endif
       /* just a signal to refresh sets, eat and continue */
-      if (0 >= READ(signalingPipe[0], 
-                   &buf[0], 
-                   MAXSIG_BUF)) 
-       LOG_STRERROR(LOG_WARNING, "read");      
+      if (0 >= READ(signalingPipe[0],
+                   &buf[0],
+                   MAXSIG_BUF))
+       LOG_STRERROR(LOG_WARNING, "read");
     }
 
     pos = clientList;
@@ -575,7 +575,7 @@
        if (SYSERR == readAndProcess(pos)) {
          ClientHandle ch
            = pos->next;
-         terminateClientConnection(pos); 
+         terminateClientConnection(pos);
          pos = ch;
          continue;
        }
@@ -627,7 +627,7 @@
            = pos->next;
           /* send only returns 0 on error (other side closed connection),
             so close the session */
-         terminateClientConnection(pos); 
+         terminateClientConnection(pos);
          pos = ch;
          continue;
        }
@@ -651,7 +651,7 @@
 #endif
        ClientHandle ch
          = pos->next;
-       terminateClientConnection(pos); 
+       terminateClientConnection(pos);
        pos = ch;
        continue;
       }
@@ -663,13 +663,13 @@
   CLOSE(listenerFD);
 
   /* close all sessions */
-  while (clientList != NULL) 
-    terminateClientConnection(clientList); 
+  while (clientList != NULL)
+    terminateClientConnection(clientList);
 
   MUTEX_UNLOCK(&clientlock);
   SEMAPHORE_UP(serverSignal);  /* signal shutdown */
   return NULL;
-} 
+}
 
 
 /**
@@ -687,12 +687,12 @@
   if (ch == NULL) {
     trustedNetworks_ = parseRoutes("127.0.0.0/8;"); /* by default, trust 
localhost only */
   } else {
-    trustedNetworks_ = parseRoutes(ch);    
-    if (trustedNetworks_ == NULL) 
+    trustedNetworks_ = parseRoutes(ch);
+    if (trustedNetworks_ == NULL)
       errexit(_("Malformed network specification in the configuration in 
section '%s' for entry '%s': %s\n"),
              "NETWORK",
-             "TRUSTED", 
-             ch); 
+             "TRUSTED",
+             ch);
     FREE(ch);
   }
 
@@ -705,8 +705,8 @@
   MUTEX_CREATE_RECURSIVE(&clientlock);
   tcpserver_keep_running = YES;
   serverSignal = SEMAPHORE_NEW(0);
-  if (0 == PTHREAD_CREATE(&TCPLISTENER_listener_, 
-                         (PThreadMain)&tcpListenMain, 
+  if (0 == PTHREAD_CREATE(&TCPLISTENER_listener_,
+                         (PThreadMain)&tcpListenMain,
                          NULL,
                          64*1024)) {
     SEMAPHORE_DOWN(serverSignal);
@@ -725,7 +725,7 @@
 
 /**
  * Shutdown the module.
- */ 
+ */
 int stopTCPServer() {
   void * unused;
 
@@ -739,7 +739,7 @@
     tcpserver_keep_running = NO;
     signalSelect();
     SEMAPHORE_DOWN(serverSignal);
-    SEMAPHORE_FREE(serverSignal);  
+    SEMAPHORE_FREE(serverSignal);
     serverSignal = NULL;
     PTHREAD_JOIN(&TCPLISTENER_listener_, &unused);
     return OK;
@@ -770,7 +770,7 @@
 
 /**
  * Register a method as a handler for specific message
- * types. 
+ * types.
  * @param type the message type
  * @param callback the method to call if a message of
  *        that type is received, if the callback returns
@@ -790,19 +790,19 @@
          __FUNCTION__,
          type);
       return SYSERR;
-    } 
+    }
   } else
     GROW(handlers,
         max_registeredType,
         type + 8);
   handlers[type] = callback;
   MUTEX_UNLOCK(&handlerlock);
-  return OK; 
+  return OK;
 }
 
 /**
  * Unregister a method as a handler for specific message
- * types. 
+ * types.
  *
  * @param type the message type
  * @param callback the method to call if a message of
@@ -841,17 +841,17 @@
 int sendTCPResultToClient(ClientHandle sock,
                          int ret) {
   CS_RETURN_VALUE rv;
-  
-  rv.header.size 
+
+  rv.header.size
     = htons(sizeof(CS_RETURN_VALUE));
-  rv.header.type 
+  rv.header.type
     = htons(CS_PROTO_RETURN_VALUE);
-  rv.return_value 
+  rv.return_value
     = htonl(ret);
   return sendToClient(sock,
                      &rv.header);
 }
-                                  
+                               
 
 
 /* end of tcpserver.c */

Modified: GNUnet/src/server/tcpserver.h
===================================================================
--- GNUnet/src/server/tcpserver.h       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/server/tcpserver.h       2005-03-20 23:54:53 UTC (rev 464)
@@ -42,12 +42,12 @@
 /**
  * Shutdown the module.
  * @return OK on success, SYSERR on error
- */ 
+ */
 int doneTCPServer();
 
 /**
  * Register a method as a handler for specific message
- * types. 
+ * types.
  * @param type the message type
  * @param callback the method to call if a message of
  *        that type is received, if the callback returns
@@ -61,7 +61,7 @@
 
 /**
  * Unregister a method as a handler for specific message
- * types. 
+ * types.
  * @param type the message type
  * @param callback the method to call if a message of
  *        that type is received, if the callback returns

Modified: GNUnet/src/server/version.c
===================================================================
--- GNUnet/src/server/version.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/server/version.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -48,7 +48,7 @@
     val = STRDUP("");
   len += strlen(val) + 2;
   tmp = MALLOC(len);
-  strcpy(tmp, *string);  
+  strcpy(tmp, *string);
   strcat(tmp, section);
   strcat(tmp, ":");
   strcat(tmp, part);
@@ -63,7 +63,7 @@
 /**
  * Get the hash code that concatenated with the
  * current version defines the current configuration.
- * 
+ *
  * The hash is determined from the configuration file,
  * since changes to certain values there will also
  * require us to run gnunet-update!
@@ -78,7 +78,7 @@
      changes require gnunet-update feels like overkill for now; one
      simple alternative would be to require gnunet-update for any
      configuration change, but that again would be too strict. */
-  dyncat(&string, "GNUNETD", "APPLICATIONS"); 
+  dyncat(&string, "GNUNETD", "APPLICATIONS");
   dyncat(&string, "FS", "QUOTA");
   dyncat(&string, "MODULES", "sqstore");
   hash(string,
@@ -92,7 +92,7 @@
  * Check if we are up-to-date.
  * @return OK if we are
  */
-int checkUpToDate() {  
+int checkUpToDate() {
   char * version;
   int len;
   EncName enc;
@@ -124,7 +124,7 @@
 
 /**
  * We are up-to-date.
- * Writes the version tag 
+ * Writes the version tag
  */
 void upToDate() {
   char * version;
@@ -142,4 +142,4 @@
   FREE(version);
 }
                
-/* end of version.c */     
+/* end of version.c */

Modified: GNUnet/src/transports/http.c
===================================================================
--- GNUnet/src/transports/http.c        2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/transports/http.c        2005-03-20 23:54:53 UTC (rev 464)
@@ -23,7 +23,7 @@
  * @author Christian Grothoff
  *
  * The basic protocol looks like this:
- * - client sends: 
+ * - client sends:
  *   POST / HTTP/1.1 CRLF
  *   Host:IP CRLF
  *   Transfer-Encoding: chunked CRLF
@@ -35,7 +35,7 @@
  *   And then an arbitrary number of chunks (CRLF HEX, CRLF, Data)
  *
  *
- * - server replies to the welcome-message: 
+ * - server replies to the welcome-message:
  *   HTTP/1.1 200 OK CRLF
  *   Server: Apache/1.3.27 CRLF
  *   Transfer-Encoding: chunked CRLF
@@ -49,7 +49,7 @@
  * - increase http compliancy; so far, the implementation of the
  *   protocol is very flawed (no good error-responses if non-peers
  *   connect, and even for the P2P basic protocol, I'm not sure how
- *   close it is to actual HTTP.   
+ *   close it is to actual HTTP.
  * - the code is not really pretty
  */
 
@@ -62,7 +62,7 @@
 
 /**
  * after how much time of the core not being associated with a http
- * connection anymore do we close it? 
+ * connection anymore do we close it?
  */
 #define HTTP_TIMEOUT 30 * cronSECONDS
 
@@ -71,19 +71,19 @@
  */
 typedef struct {
   /**
-   * claimed IP of the sender, network byte order 
-   */  
+   * claimed IP of the sender, network byte order
+   */
   IPaddr ip;
 
   /**
-   * claimed port of the sender, network byte order 
+   * claimed port of the sender, network byte order
    */
-  unsigned short port; 
+  unsigned short port;
 
   /**
-   * reserved (set to 0 for signature verification) 
+   * reserved (set to 0 for signature verification)
    */
-  unsigned short reserved; 
+  unsigned short reserved;
 
 } HostAddress;
 
@@ -101,8 +101,8 @@
  */
 typedef struct {
   /**
-   * size of the handshake message, in nbo, value is 24 
-   */    
+   * size of the handshake message, in nbo, value is 24
+   */
   unsigned short size;
 
   /**
@@ -111,7 +111,7 @@
   unsigned short version;
 
   /**
-   * Identity of the node connecting (HTTP client) 
+   * Identity of the node connecting (HTTP client)
    */
   PeerIdentity clientIdentity;
 } HTTPWelcome;
@@ -121,7 +121,7 @@
  */
 typedef struct {
   /**
-   * the http socket 
+   * the http socket
    */
   int sock;
 
@@ -132,7 +132,7 @@
   unsigned int hostPort;
 
   /**
-   * number of users of this session 
+   * number of users of this session
    */
   unsigned int users;
 
@@ -142,7 +142,7 @@
   cron_t lastUse;
 
   /**
-   * mutex for synchronized access to 'users' 
+   * mutex for synchronized access to 'users'
    */
   Mutex lock;
 
@@ -160,7 +160,7 @@
   /**
    * Current read position in rbuff.
    */
-  unsigned int rpos;  
+  unsigned int rpos;
 
   /**
    * Current size of the read buffer.
@@ -171,7 +171,7 @@
    * The read buffer (used only for the actual data).
    */
   char * rbuff;
-  
+
   /**
    * Input buffer used for the http header lines.
    * Read fills this buffer until we hit the end of
@@ -184,7 +184,7 @@
    * Current write-position in httpReadBuff;
    */
   unsigned int httpRPos;
-  
+
   /**
    * Space available in httpReadBuff
    */
@@ -210,14 +210,14 @@
 /* *********** globals ************* */
 
 /**
- * apis (our advertised API and the core api ) 
+ * apis (our advertised API and the core api )
  */
 static CoreAPIForTransport * coreAPI;
 static TransportAPI httpAPI;
 
 /**
  * one thread for listening for new connections,
- * and for reading on all open sockets 
+ * and for reading on all open sockets
  */
 static PTHREAD_T listenThread;
 
@@ -235,7 +235,7 @@
 static int http_pipe[2];
 
 /**
- * Array of currently active HTTP sessions. 
+ * Array of currently active HTTP sessions.
  */
 static TSession ** tsessions = NULL;
 static int tsessionCount;
@@ -330,7 +330,7 @@
         0);
     FREE(httpsession);
   }
-  FREE(tsession);  
+  FREE(tsession);
   return OK;
 }
 
@@ -347,7 +347,7 @@
  *
  * @param i index to the session handle
  */
-static void destroySession(int i) {  
+static void destroySession(int i) {
   HTTPSession * httpSession;
 
   httpSession = tsessions[i]->internal;
@@ -372,8 +372,8 @@
   port = (unsigned short) getConfigurationInt("HTTP",
                                              "PORT");
   if (port == 0) { /* try lookup in services */
-    if ((pse = getservbyname("tcp", "http"))) 
-      port = htons(pse->s_port);      
+    if ((pse = getservbyname("tcp", "http")))
+      port = htons(pse->s_port);
   }
   return port;
 }
@@ -390,7 +390,7 @@
  * for eventually freeing resources associated with the tesession). If
  * session is not NULL, the core takes responsbility for eventually
  * calling disconnect.
- * 
+ *
  * @param tsession the session handle passed along
  *   from the call to receive that was made by the transport
  *   layer
@@ -430,12 +430,12 @@
      Host:IP CRLF
      Transfer-Encoding: chunked CRLF
      Content-Type: text/html CRLF
-     (which we also ignore)     
+     (which we also ignore)
 
      or just "CRLF%xCRLF" where "%x" is the length of
      the next chunk (in hex); in this case, we grow rbuff to %x
-     and copy the rest of the httpReadBuff to rbuff (and reset 
-     httpReadBuff to NULL).        
+     and copy the rest of the httpReadBuff to rbuff (and reset
+     httpReadBuff to NULL).
 
      */
   unsigned int i;
@@ -460,11 +460,11 @@
                     &endPtr,
                     16);
        httpSession->httpReadBuff[k] = '\r';
-       if (endPtr == &httpSession->httpReadBuff[k]) {    
+       if (endPtr == &httpSession->httpReadBuff[k]) {  
          if (len >= MAX_BUFFER_SIZE) {
            BREAK(); /* FIMXE: inline method and do proper
                        error handling! */
-         } else {          
+         } else {      
            GROW(httpSession->rbuff,
                 httpSession->rsize,
                 len);
@@ -473,7 +473,7 @@
                   httpSession->httpRPos - (k+2));
            httpSession->rpos = httpSession->httpRPos - (k+2);
          }
-         httpSession->httpRPos = 0;        
+         httpSession->httpRPos = 0;    
        }       
       }
     }
@@ -482,7 +482,7 @@
 
 /**
  * The socket of session i has data waiting, process!
- * 
+ *
  * This function may only be called if the httplock is
  * already held by the caller.
  */
@@ -515,7 +515,7 @@
       LOG_STRERROR(LOG_DEBUG, "read");
 #endif
       httpDisconnect(tsession);
-      return SYSERR; /* error! */      
+      return SYSERR; /* error! */
     }
   } else {
     GNUNET_ASSERT(httpSession->rsize > httpSession->rpos);
@@ -531,9 +531,9 @@
       LOG_STRERROR(LOG_DEBUG, "read");
 #endif
       httpDisconnect(tsession);
-      return SYSERR; /* error! */            
+      return SYSERR; /* error! */
     }
-  }  
+  }
   if (httpSession->rpos != httpSession->rsize) {
     /* only have partial message yet */
     httpDisconnect(tsession);
@@ -541,13 +541,13 @@
   }
   cronTime(&httpSession->lastUse);
   /* complete message received, let's check what it is */
-  
+
   if (YES == httpSession->expectingWelcome) {
     HTTPWelcome * welcome;
 #if DEBUG_HTTP
     EncName enc;
 #endif
-    
+
     welcome = (HTTPWelcome*) &httpSession->rbuff[0];
     if ( (ntohs(welcome->version) != 0) ||
         (ntohs(welcome->size) != sizeof(HTTPWelcome)) ) {
@@ -585,7 +585,7 @@
     httpDisconnect(tsession);
     return OK;
   }
-  
+
   /* Full normal message received; pass on to core! */
   mp      = MALLOC(sizeof(MessagePack));
   mp->sender = httpSession->sender;
@@ -616,7 +616,7 @@
   int i;
 
   MUTEX_LOCK(&httplock);
-  if (tsessionCount == tsessionArrayLength) 
+  if (tsessionCount == tsessionArrayLength)
     GROW(tsessions,
         tsessionArrayLength,
         tsessionArrayLength * 2);
@@ -649,7 +649,7 @@
        httpSession->httpRSize,
        MAX_HTTP_HEADER);
   httpSession->sock = sock;
-  /* fill in placeholder identity to mark that we 
+  /* fill in placeholder identity to mark that we
      are waiting for the welcome message */
   httpSession->sender = *(coreAPI->myIdentity);
   httpSession->expectingWelcome = YES;
@@ -660,7 +660,7 @@
   tsession->ttype = HTTP_PROTOCOL_NUMBER;
   tsession->internal = httpSession;
   addTSession(tsession);
-}                                       
+}                                      
 
 /**
  * Main method for the thread listening on the http socket and all http
@@ -679,7 +679,7 @@
   int i;
   int max;
   int ret;
-  
+
   if (http_sock != -1)
     if (0 != LISTEN(http_sock, 5))
       LOG_STRERROR(LOG_ERROR, "listen");
@@ -717,8 +717,8 @@
        if (isSocketValid(sock)) {
          FD_SET(sock, &readSet);
          FD_SET(sock, &errorSet);
-         if (httpSession->wpos > 0) 
-           FD_SET(sock, &writeSet); /* do we have a pending write request? */  
  
+         if (httpSession->wpos > 0)
+           FD_SET(sock, &writeSet); /* do we have a pending write request? */  
        } else {
          LOG_STRERROR(LOG_ERROR, "isSocketValid");
          destroySession(i);
@@ -729,13 +729,13 @@
       }
       if (sock > max)
        max = sock;
-    }    
+    }
     MUTEX_UNLOCK(&httplock);
-    ret = SELECT(max+1, &readSet, &writeSet, &errorSet, NULL);    
+    ret = SELECT(max+1, &readSet, &writeSet, &errorSet, NULL);
     MUTEX_LOCK(&httplock);
     if ( (ret == -1) &&
-        ( (errno == EAGAIN) || (errno == EINTR) ) ) 
-      continue;    
+        ( (errno == EAGAIN) || (errno == EINTR) ) )
+      continue;
     if (ret == -1) {
       if (errno == EBADF) {
        LOG_STRERROR(LOG_ERROR, "select");
@@ -748,13 +748,13 @@
        int sock;
        
        lenOfIncomingAddr = sizeof(clientAddr);
-       sock = ACCEPT(http_sock, 
-                     (struct sockaddr *)&clientAddr, 
+       sock = ACCEPT(http_sock,
+                     (struct sockaddr *)&clientAddr,
                      &lenOfIncomingAddr);
-       if (sock != -1) {         
+       if (sock != -1) {       
          /* verify clientAddr for eligibility here (ipcheck-style,
             user should be able to specify who is allowed to connect,
-            otherwise we just close and reject the communication! */  
+            otherwise we just close and reject the communication! */
          IPaddr ipaddr;
          GNUNET_ASSERT(sizeof(struct in_addr) == sizeof(IPaddr));
          memcpy(&ipaddr,
@@ -772,7 +772,7 @@
                "Accepted connection from %u.%u.%u.%u.\n",
                PRIP(ntohl(*(int*)&clientAddr.sin_addr)));
 #endif
-           createNewSession(sock);      
+           createNewSession(sock);
          }
        } else {
          LOG_STRERROR(LOG_INFO, "accept");
@@ -785,8 +785,8 @@
 #define MAXSIG_BUF 128
       char buf[MAXSIG_BUF];
       /* just a signal to refresh sets, eat and continue */
-      if (0 >= READ(http_pipe[0], 
-                   &buf[0], 
+      if (0 >= READ(http_pipe[0],
+                   &buf[0],
                    MAXSIG_BUF)) {
        LOG_STRERROR(LOG_WARNING, "read");
       }
@@ -805,7 +805,7 @@
        int ret;
        int success;
 
-try_again_1:          
+try_again_1:
        success = SEND_NONBLOCKING(sock,
                                   httpSession->wbuff,
                                   httpSession->wpos,
@@ -861,7 +861,7 @@
     http_sock = -1;
   }
   /* close all sessions */
-  while (tsessionCount > 0) 
+  while (tsessionCount > 0)
     destroySession(0);
   MUTEX_UNLOCK(&httplock);
   SEMAPHORE_UP(serverSignal); /* we are there! */
@@ -901,7 +901,7 @@
   MUTEX_LOCK(&httplock);
   if (httpSession->wpos > 0) {
     MUTEX_UNLOCK(&httplock);
-    return SYSERR; /* already have msg pending */ 
+    return SYSERR; /* already have msg pending */
   }
   if (doPost == YES) {
     IPaddr ip;
@@ -957,7 +957,7 @@
  * Verify that a HELO-Message is correct (a node
  * is reachable at that address). Since the reply
  * will be asynchronous, a method must be called on
- * success. 
+ * success.
  * @param helo the HELO message to verify
  *        (the signature/crc have been verified before)
  * @return OK on success, SYSERR on error
@@ -979,7 +979,7 @@
 /**
  * Create a HELO-Message for the current node. The HELO is
  * created without signature and without a timestamp. The
- * GNUnet core will sign the message and add an expiration time. 
+ * GNUnet core will sign the message and add an expiration time.
  *
  * @param helo address where to store the pointer to the HELO
  *        message
@@ -1005,7 +1005,7 @@
        " Could not determine my public IP address.\n");
     return SYSERR;
   }
-  haddr->port = htons(port); 
+  haddr->port = htons(port);
   haddr->reserved = htons(0);
   msg->senderAddressSize = htons(sizeof(HostAddress));
   msg->protocol = htons(HTTP_PROTOCOL_NUMBER);
@@ -1030,18 +1030,18 @@
   TSession * tsession;
   HTTPSession * httpSession;
   struct sockaddr_in soaddr;
-  
+
   if (http_shutdown == YES)
     return SYSERR;
   haddr = (HostAddress*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
 #if DEBUG_HTTP
   LOG(LOG_DEBUG,
       "Creating HTTP connection to %u.%u.%u.%u:%u.\n",
-      PRIP(ntohl(*(int*)&haddr->ip.addr)), 
+      PRIP(ntohl(*(int*)&haddr->ip.addr)),
       ntohs(haddr->port));
 #endif
-  sock = SOCKET(PF_INET, 
-               SOCK_STREAM, 
+  sock = SOCKET(PF_INET,
+               SOCK_STREAM,
                6);/* 6: TCP */
   if (sock == -1) {
     LOG_STRERROR(LOG_FAILURE, "socket");
@@ -1056,7 +1056,7 @@
         0,
         sizeof(soaddr));
   soaddr.sin_family = AF_INET;
-  
+
   /* Do we have to use a proxy? */
   if (theProxy.sin_addr.s_addr != 0) {
     soaddr.sin_addr = theProxy.sin_addr;
@@ -1068,7 +1068,7 @@
           sizeof(IPaddr));
     soaddr.sin_port = haddr->port;
   }
-  i = CONNECT(sock, 
+  i = CONNECT(sock,
              (struct sockaddr*)&soaddr,
              sizeof(soaddr));
   if ( (i < 0) &&
@@ -1080,7 +1080,7 @@
        STRERROR(errno));
     CLOSE(sock);
     return SYSERR;
-  }  
+  }
   httpSession = MALLOC(sizeof(HTTPSession));
   httpSession->sock = sock;
   httpSession->hostIP = haddr->ip.addr;
@@ -1144,15 +1144,15 @@
                    const unsigned int size) {
   int ok;
 
-  if (size >= MAX_BUFFER_SIZE) 
+  if (size >= MAX_BUFFER_SIZE)
     return SYSERR;
-  if (http_shutdown == YES) 
-    return SYSERR;  
+  if (http_shutdown == YES)
+    return SYSERR;
   if (size == 0) {
     BREAK();
     return SYSERR;
   }
-  
+
   if (((HTTPSession*)tsession->internal)->sock == -1)
     return SYSERR; /* other side closed connection */
   ok = httpDirectSend(tsession->internal,
@@ -1170,42 +1170,42 @@
   struct sockaddr_in serverAddr;
   const int on = 1;
   unsigned short port;
-  
+
   if (serverSignal != NULL) {
     BREAK();
     return SYSERR;
   }
   serverSignal = SEMAPHORE_NEW(0);
   http_shutdown = NO;
-    
+
   if (0 != PIPE(http_pipe)) {
     LOG_STRERROR(LOG_ERROR, "pipe");
     return SYSERR;
   }
   setBlocking(http_pipe[1], NO);
- 
+
   port = getGNUnetHTTPPort();
   if (port != 0) { /* if port == 0, this is a read-only
                      business! */
     http_sock = SOCKET(PF_INET,
-                      SOCK_STREAM, 
+                      SOCK_STREAM,
                       0);
     if (http_sock < 0) {
       LOG_STRERROR(LOG_FAILURE, "socket");
       CLOSE(http_pipe[0]);
       CLOSE(http_pipe[1]);
       SEMAPHORE_FREE(serverSignal);
-      serverSignal = NULL;      
+      serverSignal = NULL;
       http_shutdown = YES;
       return SYSERR;
     }
     if (SETSOCKOPT(http_sock,
-                  SOL_SOCKET, 
-                  SO_REUSEADDR, 
-                  &on, 
-                  sizeof(on)) < 0 ) 
+                  SOL_SOCKET,
+                  SO_REUSEADDR,
+                  &on,
+                  sizeof(on)) < 0 )
       DIE_STRERROR("setsockopt");
-    memset((char *) &serverAddr, 
+    memset((char *) &serverAddr,
           0,
           sizeof(serverAddr));
     serverAddr.sin_family      = AF_INET;
@@ -1217,11 +1217,11 @@
        "http",
        ntohs(serverAddr.sin_port));
 #endif
-    if (BIND(http_sock, 
+    if (BIND(http_sock,
             (struct sockaddr *) &serverAddr,
             sizeof(serverAddr)) < 0) {
       LOG_STRERROR(LOG_ERROR, "bind");
-      LOG(LOG_ERROR, 
+      LOG(LOG_ERROR,
          _("Could not bind the HTTP listener to port %d. "
            "No transport service started.\n"),
          getGNUnetHTTPPort());
@@ -1232,13 +1232,13 @@
     }
   } else
     http_sock = -1;
-  if (0 == PTHREAD_CREATE(&listenThread, 
+  if (0 == PTHREAD_CREATE(&listenThread,
                          (PThreadMain) &httpListenMain,
                          NULL,
                          4092)) {
       SEMAPHORE_DOWN(serverSignal); /* wait for server to be up */
   } else {
-    LOG_STRERROR(LOG_ERROR, 
+    LOG_STRERROR(LOG_ERROR,
                 "pthread_create");
     CLOSE(http_sock);
     SEMAPHORE_FREE(serverSignal);
@@ -1258,7 +1258,7 @@
 
   if (http_shutdown == YES)
     return OK;
-  http_shutdown = YES;  
+  http_shutdown = YES;
   signalSelect();
   if (serverSignal != NULL) {
     haveThread = YES;
@@ -1266,7 +1266,7 @@
     SEMAPHORE_FREE(serverSignal);
   } else
     haveThread = NO;
-  serverSignal = NULL; 
+  serverSignal = NULL;
   CLOSE(http_pipe[1]);
   CLOSE(http_pipe[0]);
   if (http_sock != -1) {
@@ -1305,25 +1305,25 @@
   char * ret;
   HostAddress * haddr;
   size_t n;
-  
-  haddr = (HostAddress*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];  
+
+  haddr = (HostAddress*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
   n = 4*4+6+16;
   ret = MALLOC(n);
   SNPRINTF(ret,
           n,
           "%u.%u.%u.%u:%u (HTTP)",
-          PRIP(ntohl(*(int*)&haddr->ip.addr)), 
+          PRIP(ntohl(*(int*)&haddr->ip.addr)),
           ntohs(haddr->port));
   return ret;
 }
 
- 
+
 /* ******************** public API ******************** */
- 
+
 /**
  * The exported method. Makes the core api available
  * via a global and returns the udp transport API.
- */ 
+ */
 TransportAPI * inittransport_http(CoreAPIForTransport * core) {
   struct hostent *ip;
   char * proxy;
@@ -1337,19 +1337,19 @@
        tsessionArrayLength,
        32);
   coreAPI = core;
- 
-  proxy = getConfigurationString("GNUNETD", 
+
+  proxy = getConfigurationString("GNUNETD",
                                 "HTTP-PROXY");
   if (proxy != NULL) {
     ip = GETHOSTBYNAME(proxy);
     if (ip == NULL) {
-      LOG(LOG_ERROR, 
+      LOG(LOG_ERROR,
          _("Could not resolve name of HTTP proxy '%s'.\n"),
          proxy);
       theProxy.sin_addr.s_addr = 0;
     } else {
       theProxy.sin_addr.s_addr = ((struct in_addr *)ip->h_addr)->s_addr;
-      proxyPort = getConfigurationString("GNUNETD", 
+      proxyPort = getConfigurationString("GNUNETD",
                                         "HTTP-PROXY-PORT");
       if (proxyPort == NULL) {
        theProxy.sin_port = htons(8080);
@@ -1362,7 +1362,7 @@
   } else {
     theProxy.sin_addr.s_addr = 0;
   }
-  
+
   httpAPI.protocolNumber       = HTTP_PROTOCOL_NUMBER;
   httpAPI.mtu                  = 0;
   httpAPI.cost                 = 20000; /* about equal to udp */
@@ -1383,9 +1383,9 @@
 
 void donetransport_http() {
   int i;
-  for (i=tsessionCount-1;i>=0;i--) 
-    destroySession(i); 
-  GROW(tsessions, 
+  for (i=tsessionCount-1;i>=0;i--)
+    destroySession(i);
+  GROW(tsessions,
        tsessionArrayLength,
        0);
   FREENONNULL(filteredNetworks_);

Modified: GNUnet/src/transports/nat.c
===================================================================
--- GNUnet/src/transports/nat.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/transports/nat.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -49,7 +49,7 @@
 
 /**
  * Verify that a HELO-Message is correct (a node is reachable at that
- * address). 
+ * address).
  *
  * @param helo the HELO message to verify
  *        (the signature/crc have been verified before)
@@ -73,7 +73,7 @@
       else
        return SYSERR;
     }
-    return OK;  
+    return OK;
   }
 }
 
@@ -185,7 +185,7 @@
 /**
  * The exported method. Makes the core api available via a global and
  * returns the nat transport API.
- */ 
+ */
 TransportAPI * inittransport_nat(CoreAPIForTransport * core) {
   coreAPI = core;
   natAPI.protocolNumber       = NAT_PROTOCOL_NUMBER;

Modified: GNUnet/src/transports/smtp.c
===================================================================
--- GNUnet/src/transports/smtp.c        2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/transports/smtp.c        2005-03-20 23:54:53 UTC (rev 464)
@@ -41,7 +41,7 @@
  * Host-Address in a SMTP network.
  */
 typedef struct {
-  
+
   /**
    * Filter line that every sender must include in the E-mails such
    * that the receiver can effectively filter out the GNUnet traffic
@@ -50,10 +50,10 @@
   char filter[FILTER_STRING_SIZE];
 
   /**
-   * Claimed E-mail address of the sender. 
+   * Claimed E-mail address of the sender.
    * Format is "address@hidden" with null termination, padded to be
    * of a multiple of 8 bytes long.
-   */  
+   */
   char senderAddress[0];
 
 } EmailAddress;
@@ -66,14 +66,14 @@
   /* this struct is always preceeded by n bytes of p2p messages
      that the GNUnet core will process */
 
-  /** 
+  /**
    * size of the message, in bytes, including this header; max
    * 65536-header (network byte order)
    */
   unsigned short size;
 
   /**
-   * What is the identity of the sender (hash of public key) 
+   * What is the identity of the sender (hash of public key)
    */
   PeerIdentity sender;
 
@@ -82,13 +82,13 @@
 /* *********** globals ************* */
 
 /**
- * apis (our advertised API and the core api ) 
+ * apis (our advertised API and the core api )
  */
 static CoreAPIForTransport * coreAPI;
 static TransportAPI smtpAPI;
 
 /**
- * thread that listens for inbound messages 
+ * thread that listens for inbound messages
  */
 static PTHREAD_T dispatchThread;
 
@@ -161,14 +161,14 @@
     if (i < len) {
       c = (data[i] << 2) & 0x3f;
       if (++i < len)
-       c |= (data[i] >> 6) & 0x03;      
+       c |= (data[i] >> 6) & 0x03;
       (*output)[ret++] = cvt[(int)c];
       CHECKLINE;
     } else {
       ++i;
       (*output)[ret++] = FILLCHAR;
       CHECKLINE;
-    }    
+    }
     if (i < len) {
       c = data[i] & 0x3f;
       (*output)[ret++] = cvt[(int)c];
@@ -226,22 +226,22 @@
       CHECK_CRLF;
       c = data[i];
       if (FILLCHAR == c)
-       break;      
+       break;
       c = (char) cvtfind(c);
       c1 = ((c1 << 4) & 0xf0) | ((c >> 2) & 0xf);
       (*output)[ret++] = c1;
-    } 
+    }
     if (++i < len) {
       CHECK_CRLF;
       c1 = data[i];
       if (FILLCHAR == c1)
        break;
-      
+
       c1 = (char) cvtfind(c1);
       c = ((c << 6) & 0xc0) | c1;
       (*output)[ret++] = c;
     }
-  }  
+  }
  END:
   return ret;
 }
@@ -263,9 +263,9 @@
   port = (unsigned short) getConfigurationInt("SMTP",
                                              "PORT");
   if (port == 0) { /* try lookup in services */
-    if ((pse = getservbyname("gnunet", "smtp"))) 
-      port = ntohs(pse->s_port);      
-    else 
+    if ((pse = getservbyname("gnunet", "smtp")))
+      port = ntohs(pse->s_port);
+    else
       errexit("Cannot determine port to bind to. "\
              " Define in configuration file in section %s under %s "\
              "or in /etc/services under smtp/gnunet.\n",
@@ -290,13 +290,13 @@
   if (hostname == NULL)
     hostname = STRDUP("localhost");
   ip = GETHOSTBYNAME(hostname);
-  if (ip == NULL) {    
+  if (ip == NULL) {
     LOG(LOG_ERROR,
        _("Could not resolve name of SMTP server '%s': %s"),
        hostname, hstrerror(h_errno));
     FREE(hostname);
     return -1;
-  } 
+  }
   FREE(hostname);
   res = SOCKET(PF_INET, SOCK_STREAM, 6);/* 6: TCP */
   if (res == -1) {
@@ -322,7 +322,7 @@
 #define MAX_SMTP_LINE 128
 
 /**
- * Read a single line from the socket and check if 
+ * Read a single line from the socket and check if
  * it starts with the expected string. If the server
  * sends more than one line, an arbitrary amount of
  * data from the next line may be read!
@@ -350,8 +350,8 @@
     if (success == NO) {
       gnunet_util_sleep(20);
       goto try_again;
-    }      
-        
+    }
+       
     if (i <= 0)
       return SYSERR;
     while (i > 0) {
@@ -379,20 +379,20 @@
   char * target;
   int size;
   int ret;
-  
+
   size = 256;
   ret = -1;
   target = MALLOC(size);
   while (ret == -1) {
     va_start(args, format);
     ret = vsnprintf(target, size, format, args);
-    va_end(args);  
+    va_end(args);
     if (ret == -1) {
       FREE(target);
       size *= 2;
       target = MALLOC(size);
     }
-  }  
+  }
   if (ret == SEND_BLOCKING_ALL(sock, target, ret))
     ret = OK;
   FREE(target);
@@ -415,7 +415,7 @@
   GNUNET_ASSERT(pipename != NULL);
   UNLINK(pipename);
   if (0 != mkfifo(pipename,
-                 S_IWUSR|S_IRUSR)) 
+                 S_IWUSR|S_IRUSR))
     DIE_STRERROR("mkfifo");
   LINESIZE = ((smtpAPI.mtu * 4 / 3) + 8) * (MAX_CHAR_PER_LINE+2)/
              MAX_CHAR_PER_LINE; /* maximum size of a line supported */
@@ -431,14 +431,14 @@
 
 
   SEMAPHORE_UP(serverSignal); /* we are there! */
-  while ( smtp_shutdown == NO ) {    
+  while ( smtp_shutdown == NO ) {
     FILE * fdes;
     char * retl;
     char * boundary;
     char * out;
     unsigned int size;
     MessagePack * coreMP;
-    
+
     smtp_pipe = OPEN(pipename, O_RDONLY);
     fdes = fdopen(smtp_pipe, "r");
     while ( smtp_shutdown == NO ) {
@@ -454,7 +454,7 @@
        FREE(boundary);
        goto END; /* format error */
       } else {
-       boundary[strlen(boundary)-2] = '\0';      
+       boundary[strlen(boundary)-2] = '\0';
        boundary[0] = boundary[1] = '-';
       }
       do {
@@ -480,8 +480,8 @@
       if (ntohs(mp->size) != size) {
        LOG(LOG_WARNING,
            _("Received malformed message via SMTP (size mismatch).\n"));
-       LOG(LOG_DEBUG, 
-           "Size returned by base64=%d, in the msg=%d.\n", 
+       LOG(LOG_DEBUG,
+           "Size returned by base64=%d, in the msg=%d.\n",
            size,
            ntohl(mp->size));
        goto END;
@@ -493,16 +493,16 @@
       memcpy(&coreMP->sender,
             &mp->sender,
             sizeof(PeerIdentity));
-      LOG(LOG_DEBUG, 
+      LOG(LOG_DEBUG,
          "SMTP message passed to the core.\n");
 
       coreAPI->receive(coreMP);
       READLINE(line, LINESIZE); /* new line at the end */
     }
   END:
-    LOG(LOG_DEBUG, 
+    LOG(LOG_DEBUG,
        "SMTP message processed.\n");
-    fclose(fdes);    
+    fclose(fdes);
   }
   SEMAPHORE_UP(serverSignal); /* we are there! */
   return NULL;
@@ -530,13 +530,13 @@
        " received invalid SMTP address advertisement (HELO) %d != %d or %d != 
0\n",
        ntohs(helo->header.size),
        sizeof(HELO_Message)+ntohs(helo->senderAddressSize),
-       
maddr->senderAddress[ntohs(helo->senderAddressSize)-1-FILTER_STRING_SIZE]);    
+       
maddr->senderAddress[ntohs(helo->senderAddressSize)-1-FILTER_STRING_SIZE]);
     BREAK();
     return SYSERR; /* obviously invalid */
   } else {
     LOG(LOG_DEBUG,
        "Verified SMTP helo from %s.\n",
-       &maddr->senderAddress[0]);    
+       &maddr->senderAddress[0]);
     return OK;
   }
 }
@@ -556,8 +556,8 @@
   char * filter;
   EmailAddress * haddr;
   int i;
-  
-  email = getConfigurationString("SMTP", 
+
+  email = getConfigurationString("SMTP",
                                 "EMAIL");
   if (email == NULL) {
     LOG(LOG_DEBUG,
@@ -566,8 +566,8 @@
   }
   filter = getConfigurationString("SMTP",
                                  "FILTER");
-  if (filter == NULL) { 
-    LOG(LOG_ERROR, 
+  if (filter == NULL) {
+    LOG(LOG_ERROR,
        _("No filter for E-mail specified, cannot create SMTP 
advertisement.\n"));
     FREE(email);
     return SYSERR;
@@ -599,7 +599,7 @@
       = htons(HELO_Message_size(msg));
   *helo = msg;
   FREE(email);
-  if (verifyHelo(*helo) == SYSERR) 
+  if (verifyHelo(*helo) == SYSERR)
     GNUNET_ASSERT(0);
   return OK;
 }
@@ -613,7 +613,7 @@
 static int smtpConnect(HELO_Message * helo,
                       TSession ** tsessionPtr) {
   TSession * tsession;
-  
+
   tsession = MALLOC(sizeof(TSession));
   tsession->internal = helo;
   tsession->ttype = smtpAPI.protocolNumber;
@@ -656,7 +656,7 @@
   char * ebody;
   int res;
   int ssize, ssize2;
-  
+
   if (smtp_shutdown == YES)
     return SYSERR;
   if (size == 0) {
@@ -668,7 +668,7 @@
     return SYSERR;
   }
   helo = (HELO_Message*)tsession->internal;
-  if (helo == NULL) 
+  if (helo == NULL)
     return SYSERR;
 
   haddr = (EmailAddress*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
@@ -690,19 +690,19 @@
   LOG(LOG_DEBUG,
       "Base64-encoded message size is %d bytes.\n",
       ssize);
-  
+
   FREE(msg);
   MUTEX_LOCK(&smtpLock);
   res = SYSERR;
   /*
     The mail from field is left empty, so mailing list servers
-    will interpret the message as a bounce message.    
-    MAIL FROM: <>    
+    will interpret the message as a bounce message.
+    MAIL FROM: <>
     RCPT TO: address@hidden
     DATA
     FILTER
     ebody
-    .    
+    .
    */
   if (OK == writeSMTPLine(smtp_sock,
                          "MAIL FROM: <>\r\n"))
@@ -716,7 +716,7 @@
          if (OK == writeSMTPLine(smtp_sock,
                                  "DATA\r\n"))
            if (OK == readSMTPLine(smtp_sock,
-                                  "354 ")) 
+                                  "354 "))
              if (OK == writeSMTPLine(smtp_sock,
                                      "%-*s\r\n",
                                      MIN(FILTER_STRING_SIZE,
@@ -732,14 +732,14 @@
                    if (SYSERR != SEND_BLOCKING_ALL(smtp_sock,
                                                    ebody,
                                                    ssize))
-                     if (OK == writeSMTPLine(smtp_sock, 
+                     if (OK == writeSMTPLine(smtp_sock,
                                              "\r\n--%s\r\n",
                                              BOUNDARY_SPECIFIER))
                        if (OK == writeSMTPLine(smtp_sock,
                                                "\r\n.\r\n"))
                          if (OK == readSMTPLine(smtp_sock,
                                                 "250 "))
-                           res = OK;  
+                           res = OK;
   MUTEX_UNLOCK(&smtpLock);
   if (res != OK)
     LOG(LOG_WARNING,
@@ -796,7 +796,7 @@
        __FILE__, __LINE__);
     CLOSE(smtp_sock);
     return SYSERR;
-  } 
+  }
   email = NULL; /* abusing email as a flag... */
   if (OK == writeSMTPLine(smtp_sock,
                          "HELO %s\r\n",
@@ -804,9 +804,9 @@
                                                 "SENDERHOSTNAME")))
     if (OK == readSMTPLine(smtp_sock,
                           "250 "))
-      email = getConfigurationString("SMTP", 
+      email = getConfigurationString("SMTP",
                                     "EMAIL");
-    
+
   if (email == NULL) {
     LOG(LOG_DEBUG,
        "No email-address specified, will not advertise SMTP address.\n");
@@ -818,7 +818,7 @@
   if (0 != PTHREAD_CREATE(&dispatchThread,
                          (PThreadMain) &listenAndDistribute,
                          NULL,
-                         1024*4)) 
+                         1024*4))
     DIE_STRERROR("pthread_create");
   SEMAPHORE_DOWN(serverSignal); /* wait for server to be up */
   return OK;
@@ -853,8 +853,8 @@
   char * ret;
   EmailAddress * addr;
   size_t n;
-  
-  addr = (EmailAddress*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];  
+
+  addr = (EmailAddress*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
   n = FILTER_STRING_SIZE + strlen(addr->senderAddress) + 16;
   ret = MALLOC(n);
   SNPRINTF(ret,
@@ -874,7 +874,7 @@
 /**
  * The exported method. Makes the core api available via a global and
  * returns the smtp transport API.
- */ 
+ */
 TransportAPI * inittransport_smtp(CoreAPIForTransport * core) {
   int mtu;
 

Modified: GNUnet/src/transports/tcp.c
===================================================================
--- GNUnet/src/transports/tcp.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/transports/tcp.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -32,7 +32,7 @@
 
 /**
  * after how much time of the core not being associated with a tcp
- * connection anymore do we close it? 
+ * connection anymore do we close it?
  */
 #define TCP_TIMEOUT 30 * cronSECONDS
 
@@ -41,31 +41,31 @@
  */
 typedef struct {
   /**
-   * claimed IP of the sender, network byte order 
-   */  
+   * claimed IP of the sender, network byte order
+   */
   IPaddr ip;
 
   /**
-   * claimed port of the sender, network byte order 
+   * claimed port of the sender, network byte order
    */
-  unsigned short port; 
+  unsigned short port;
 
   /**
-   * reserved (set to 0 for signature verification) 
+   * reserved (set to 0 for signature verification)
    */
-  unsigned short reserved; 
+  unsigned short reserved;
 
 } HostAddress;
 
 /**
- * TCP Message-Packet header. 
+ * TCP Message-Packet header.
  */
 typedef struct {
   /**
-   * size of the message, in bytes, including this header; 
+   * size of the message, in bytes, including this header;
    * max 65535; we do NOT want to make this field an int
    * because then a malicious peer could cause us to allocate
-   * lots of memory -- this bounds it by 64k/peer. 
+   * lots of memory -- this bounds it by 64k/peer.
    * Field is in network byte order.
    */
   unsigned short size;
@@ -76,7 +76,7 @@
   unsigned short reserved;
 
   /**
-   * This struct is followed by MESSAGE_PARTs - until size is reached 
+   * This struct is followed by MESSAGE_PARTs - until size is reached
    * There is no "end of message".
    */
 } TCPMessagePack;
@@ -87,8 +87,8 @@
  */
 typedef struct {
   /**
-   * size of the handshake message, in nbo, value is 24 
-   */    
+   * size of the handshake message, in nbo, value is 24
+   */
   unsigned short size;
 
   /**
@@ -97,7 +97,7 @@
   unsigned short version;
 
   /**
-   * Identity of the node connecting (TCP client) 
+   * Identity of the node connecting (TCP client)
    */
   PeerIdentity clientIdentity;
 } TCPWelcome;
@@ -107,12 +107,12 @@
  */
 typedef struct {
   /**
-   * the tcp socket 
+   * the tcp socket
    */
   int sock;
 
   /**
-   * number of users of this session 
+   * number of users of this session
    */
   int users;
 
@@ -122,7 +122,7 @@
   cron_t lastUse;
 
   /**
-   * mutex for synchronized access to 'users' 
+   * mutex for synchronized access to 'users'
    */
   Mutex lock;
 
@@ -140,7 +140,7 @@
   /**
    * Current read position in the buffer.
    */
-  unsigned int pos;  
+  unsigned int pos;
 
   /**
    * Current size of the read buffer.
@@ -172,14 +172,14 @@
 /* *********** globals ************* */
 
 /**
- * apis (our advertised API and the core api ) 
+ * apis (our advertised API and the core api )
  */
 static CoreAPIForTransport * coreAPI;
 static TransportAPI tcpAPI;
 
 /**
  * one thread for listening for new connections,
- * and for reading on all open sockets 
+ * and for reading on all open sockets
  */
 static PTHREAD_T listenThread;
 
@@ -197,7 +197,7 @@
 static int tcp_pipe[2];
 
 /**
- * Array of currently active TCP sessions. 
+ * Array of currently active TCP sessions.
  */
 static TSession ** tsessions = NULL;
 static int tsessionCount;
@@ -254,7 +254,7 @@
   ret = WRITE(tcp_pipe[1],
              &i,
              sizeof(char));
-  if (ret != sizeof(char)) 
+  if (ret != sizeof(char))
     LOG_STRERROR(LOG_ERROR, "write");
 }
 
@@ -301,7 +301,7 @@
  *
  * @param i index to the session handle
  */
-static void destroySession(int i) {  
+static void destroySession(int i) {
   TCPSession * tcpSession;
 
   tcpSession = tsessions[i]->internal;
@@ -317,7 +317,7 @@
 
 /**
  * Get the GNUnet UDP port from the configuration,
- * or from /etc/services if it is not specified in 
+ * or from /etc/services if it is not specified in
  * the config file.
  */
 static unsigned short getGNUnetTCPPort() {
@@ -327,8 +327,8 @@
   port = (unsigned short) getConfigurationInt("TCP",
                                              "PORT");
   if (port == 0) { /* try lookup in services */
-    if ((pse = getservbyname("gnunet", "tcp"))) 
-      port = htons(pse->s_port);      
+    if ((pse = getservbyname("gnunet", "tcp")))
+      port = htons(pse->s_port);
   }
   return port;
 }
@@ -345,7 +345,7 @@
  * for eventually freeing resources associated with the tesession). If
  * session is not NULL, the core takes responsbility for eventually
  * calling disconnect.
- * 
+ *
  * @param tsession the session handle passed along
  *   from the call to receive that was made by the transport
  *   layer
@@ -368,7 +368,7 @@
 
 /**
  * The socket of session i has data waiting, process!
- * 
+ *
  * This function may only be called if the tcplock is
  * already held by the caller.
  */
@@ -405,12 +405,12 @@
   }
   if (ret < 0) {
     if ( (errno == EINTR) ||
-        (errno == EAGAIN) ) { 
+        (errno == EAGAIN) ) {
 #if DEBUG_TCP
       LOG_STRERROR(LOG_DEBUG, "read");
 #endif
       tcpDisconnect(tsession);
-      return OK;    
+      return OK;
     }
 #if DEBUG_TCP
     LOG_STRERROR(LOG_INFO, "read");
@@ -431,21 +431,21 @@
     LOG(LOG_DEBUG,
        "Read %d bytes on socket %d, expecting %d for full message\n",
        tcpSession->pos,
-       tcpSession->sock, 
+       tcpSession->sock,
        len);
 #endif
     if (tcpSession->pos < len) {
       tcpDisconnect(tsession);
       return OK;
     }
-    
+
     /* complete message received, let's check what it is */
     if (YES == tcpSession->expectingWelcome) {
       TCPWelcome * welcome;
-#if DEBUG_TCP 
+#if DEBUG_TCP
       EncName enc;
 #endif
-      
+
       welcome = (TCPWelcome*) &tcpSession->rbuff[0];
       if ( (ntohs(welcome->version) != 0) ||
           (ntohs(welcome->size) != sizeof(TCPWelcome)) ) {
@@ -456,7 +456,7 @@
       }
       tcpSession->expectingWelcome = NO;
       tcpSession->sender = welcome->clientIdentity;
-#if DEBUG_TCP 
+#if DEBUG_TCP
       IFLOG(LOG_DEBUG,
            hash2enc(&tcpSession->sender.hashPubKey,
                     &enc));
@@ -467,15 +467,15 @@
       memmove(&tcpSession->rbuff[0],
              &tcpSession->rbuff[sizeof(TCPWelcome)],
              tcpSession->pos - sizeof(TCPWelcome));
-      tcpSession->pos -= sizeof(TCPWelcome); 
+      tcpSession->pos -= sizeof(TCPWelcome);
       len = ntohs(((TCPMessagePack*)&tcpSession->rbuff[0])->size) + 
sizeof(TCPMessagePack);
-    } 
+    }
     if ( (tcpSession->pos < 2) ||
         (tcpSession->pos < len) ) {
       tcpDisconnect(tsession);
       return OK;
     }
-    
+
     pack = (TCPMessagePack*)&tcpSession->rbuff[0];
     /* send msg to core! */
     if (len <= sizeof(TCPMessagePack)) {
@@ -527,7 +527,7 @@
   int i;
 
   MUTEX_LOCK(&tcplock);
-  if (tsessionCount == tsessionArrayLength) 
+  if (tsessionCount == tsessionArrayLength)
     GROW(tsessions,
         tsessionArrayLength,
         tsessionArrayLength * 2);
@@ -554,7 +554,7 @@
   tcpSession->wbuff = NULL;
   tcpSession->wsize = 0;
   tcpSession->sock = sock;
-  /* fill in placeholder identity to mark that we 
+  /* fill in placeholder identity to mark that we
      are waiting for the welcome message */
   tcpSession->sender = *(coreAPI->myIdentity);
   tcpSession->expectingWelcome = YES;
@@ -565,7 +565,7 @@
   tsession->ttype = TCP_PROTOCOL_NUMBER;
   tsession->internal = tcpSession;
   addTSession(tsession);
-}                                       
+}                                      
 
 /**
  * Main method for the thread listening on the tcp socket and all tcp
@@ -584,7 +584,7 @@
   int i;
   int max;
   int ret;
-  
+
   if (tcp_sock != -1)
     if (0 != LISTEN(tcp_sock, 5))
       LOG_STRERROR(LOG_ERROR, "listen");
@@ -634,13 +634,13 @@
       }
       if (sock > max)
        max = sock;
-    }    
+    }
     MUTEX_UNLOCK(&tcplock);
-    ret = SELECT(max+1, &readSet, &writeSet, &errorSet, NULL);    
+    ret = SELECT(max+1, &readSet, &writeSet, &errorSet, NULL);
     MUTEX_LOCK(&tcplock);
     if ( (ret == -1) &&
-        ( (errno == EAGAIN) || (errno == EINTR) ) ) 
-      continue;    
+        ( (errno == EAGAIN) || (errno == EINTR) ) )
+      continue;
     if (ret == -1) {
       if (errno == EBADF) {
        LOG_STRERROR(LOG_ERROR, "select");
@@ -652,14 +652,14 @@
       if (FD_ISSET(tcp_sock, &readSet)) {
        int sock;
        
-       lenOfIncomingAddr = sizeof(clientAddr); 
-       sock = ACCEPT(tcp_sock, 
-                     (struct sockaddr *)&clientAddr, 
+       lenOfIncomingAddr = sizeof(clientAddr);
+       sock = ACCEPT(tcp_sock,
+                     (struct sockaddr *)&clientAddr,
                      &lenOfIncomingAddr);
-       if (sock != -1) {         
+       if (sock != -1) {       
          /* verify clientAddr for eligibility here (ipcheck-style,
             user should be able to specify who is allowed to connect,
-            otherwise we just close and reject the communication! */  
+            otherwise we just close and reject the communication! */
 
          IPaddr ipaddr;
          GNUNET_ASSERT(sizeof(struct in_addr) == sizeof(IPaddr));
@@ -679,7 +679,7 @@
                "Accepted connection from %u.%u.%u.%u.\n",
                PRIP(ntohl(*(int*)&clientAddr.sin_addr)));      
 #endif
-           createNewSession(sock);      
+           createNewSession(sock);
          }
        } else {
          LOG_STRERROR(LOG_INFO, "accept");
@@ -692,8 +692,8 @@
 #define MAXSIG_BUF 128
       char buf[MAXSIG_BUF];
       /* just a signal to refresh sets, eat and continue */
-      if (0 >= READ(tcp_pipe[0], 
-                   &buf[0], 
+      if (0 >= READ(tcp_pipe[0],
+                   &buf[0],
                    MAXSIG_BUF)) {
        LOG_STRERROR(LOG_WARNING, "read");
       }
@@ -729,7 +729,7 @@
          gnunet_util_sleep(20);
          goto try_again_1;
         }
-        
+
        if (ret == 0) {
           /* send only returns 0 on error (other side closed connection),
           * so close the session */
@@ -768,7 +768,7 @@
     tcp_sock = -1;
   }
   /* close all sessions */
-  while (tsessionCount > 0) 
+  while (tsessionCount > 0)
     destroySession(0);
   MUTEX_UNLOCK(&tcplock);
   SEMAPHORE_UP(serverSignal); /* we are there! */
@@ -823,7 +823,7 @@
   }
   if (success == NO)
     ret = 0;
- 
+
   if (ret < ssize) {/* partial send */
     if (tcpSession->wsize < ssize - ret) {
       GROW(tcpSession->wbuff,
@@ -858,7 +858,7 @@
   int ok;
 
   if (tcp_shutdown == YES)
-    return SYSERR;  
+    return SYSERR;
   if (tcpSession->sock == -1) {
 #if DEBUG_TCP
     LOG(LOG_INFO,
@@ -878,7 +878,7 @@
         tcpSession->wpos + ssize);
     memcpy(&tcpSession->wbuff[old],
           mp,
-          ssize);    
+          ssize);
     ok = OK;
   } else {
     ok = tcpDirectSend(tcpSession,
@@ -904,7 +904,7 @@
                           const unsigned int size) {
   TCPMessagePack * mp;
   int ok;
-  
+
   if (size >= MAX_BUFFER_SIZE)
     return SYSERR;
   if (tcp_shutdown == YES)
@@ -920,7 +920,7 @@
         msg,
         size);
   mp->size = htons(size);
-  mp->reserved = 0;  
+  mp->reserved = 0;
   ok = tcpDirectSendReliable(tsession->internal,
                             mp,
                             size + sizeof(TCPMessagePack));
@@ -932,7 +932,7 @@
  * Verify that a HELO-Message is correct (a node
  * is reachable at that address). Since the reply
  * will be asynchronous, a method must be called on
- * success. 
+ * success.
  * @param helo the HELO message to verify
  *        (the signature/crc have been verified before)
  * @return OK on success, SYSERR on error
@@ -954,7 +954,7 @@
 /**
  * Create a HELO-Message for the current node. The HELO is
  * created without signature and without a timestamp. The
- * GNUnet core will sign the message and add an expiration time. 
+ * GNUnet core will sign the message and add an expiration time.
  *
  * @param helo address where to store the pointer to the HELO
  *        message
@@ -980,7 +980,7 @@
        _("Could not determine my public IP address.\n"));
     return SYSERR;
   }
-  haddr->port = htons(port); 
+  haddr->port = htons(port);
   haddr->reserved = htons(0);
   msg->senderAddressSize = htons(sizeof(HostAddress));
   msg->protocol = htons(TCP_PROTOCOL_NUMBER);
@@ -1012,11 +1012,11 @@
 #if DEBUG_TCP
   LOG(LOG_DEBUG,
       "Creating TCP connection to %u.%u.%u.%u:%u.\n",
-      PRIP(ntohl(*(int*)&haddr->ip.addr)), 
+      PRIP(ntohl(*(int*)&haddr->ip.addr)),
       ntohs(haddr->port));
 #endif
   sock = SOCKET(PF_INET,
-               SOCK_STREAM, 
+               SOCK_STREAM,
                6); /* 6: TCP */
   if (sock == -1) {
     LOG_STRERROR(LOG_FAILURE, "socket");
@@ -1037,7 +1037,7 @@
         &haddr->ip,
         sizeof(IPaddr));
   soaddr.sin_port = haddr->port;
-  i = CONNECT(sock, 
+  i = CONNECT(sock,
              (struct sockaddr*)&soaddr,
              sizeof(soaddr));
   if ( (i < 0) &&
@@ -1049,7 +1049,7 @@
        STRERROR(errno));
     CLOSE(sock);
     return SYSERR;
-  }  
+  }
   if (0 != setBlocking(sock, NO)) {
     LOG_STRERROR(LOG_FAILURE, "setBlocking");
     CLOSE(sock);
@@ -1089,7 +1089,7 @@
   }
   MUTEX_UNLOCK(&tcplock);
   signalSelect();
-  
+
   *tsessionPtr = tsession;
   FREE(helo);
   return OK;
@@ -1108,17 +1108,17 @@
                   const unsigned int size) {
   TCPMessagePack * mp;
   int ok;
- 
+
   if (size >= MAX_BUFFER_SIZE)
     return SYSERR;
- 
+
   if (tcp_shutdown == YES)
     return SYSERR;
   if (size == 0) {
     BREAK();
     return SYSERR;
   }
-  if (((TCPSession*)tsession->internal)->sock == -1) 
+  if (((TCPSession*)tsession->internal)->sock == -1)
     return SYSERR; /* other side closed connection */
   mp = MALLOC(sizeof(TCPMessagePack) + size);
   memcpy(&mp[1],
@@ -1141,24 +1141,24 @@
   struct sockaddr_in serverAddr;
   const int on = 1;
   unsigned short port;
-  
+
   if (serverSignal != NULL) {
     BREAK();
     return SYSERR;
   }
   serverSignal = SEMAPHORE_NEW(0);
   tcp_shutdown = NO;
-    
+
   if (0 != PIPE(tcp_pipe)) {
     LOG_STRERROR(LOG_ERROR, "pipe");
     return SYSERR;
   }
-  setBlocking(tcp_pipe[1], NO);  
+  setBlocking(tcp_pipe[1], NO);
 
   port = getGNUnetTCPPort();
   if (port != 0) { /* if port == 0, this is a read-only
                      business! */
-    tcp_sock = SOCKET(PF_INET, 
+    tcp_sock = SOCKET(PF_INET,
                      SOCK_STREAM,
                      0);
     if (tcp_sock < 0) {
@@ -1166,17 +1166,17 @@
       CLOSE(tcp_pipe[0]);
       CLOSE(tcp_pipe[1]);
       SEMAPHORE_FREE(serverSignal);
-      serverSignal = NULL;      
+      serverSignal = NULL;
       tcp_shutdown = YES;
       return SYSERR;
     }
     if (SETSOCKOPT(tcp_sock,
-                  SOL_SOCKET, 
-                  SO_REUSEADDR, 
-                  &on, 
-                  sizeof(on)) < 0 ) 
+                  SOL_SOCKET,
+                  SO_REUSEADDR,
+                  &on,
+                  sizeof(on)) < 0 )
       DIE_STRERROR("setsockopt");
-    memset((char *) &serverAddr, 
+    memset((char *) &serverAddr,
           0,
           sizeof(serverAddr));
     serverAddr.sin_family      = AF_INET;
@@ -1188,7 +1188,7 @@
        "tcp",
        ntohs(serverAddr.sin_port));
 #endif
-    if (BIND(tcp_sock, 
+    if (BIND(tcp_sock,
             (struct sockaddr *) &serverAddr,
             sizeof(serverAddr)) < 0) {
       LOG_STRERROR(LOG_ERROR, "bind");
@@ -1203,13 +1203,13 @@
     }
   } else
     tcp_sock = -1;
-  if (0 == PTHREAD_CREATE(&listenThread, 
+  if (0 == PTHREAD_CREATE(&listenThread,
                          (PThreadMain) &tcpListenMain,
                          NULL,
                          4092)) {
     SEMAPHORE_DOWN(serverSignal); /* wait for server to be up */
   } else {
-    LOG_STRERROR(LOG_ERROR, 
+    LOG_STRERROR(LOG_ERROR,
                 "pthread_create");
     CLOSE(tcp_sock);
     SEMAPHORE_FREE(serverSignal);
@@ -1226,10 +1226,10 @@
 static int stopTransportServer() {
   void * unused;
   int haveThread;
-  
+
   if (tcp_shutdown == YES)
     return OK;
-  tcp_shutdown = YES;  
+  tcp_shutdown = YES;
   signalSelect();
   if (serverSignal != NULL) {
     haveThread = YES;
@@ -1237,7 +1237,7 @@
     SEMAPHORE_FREE(serverSignal);
   } else
     haveThread = NO;
-  serverSignal = NULL; 
+  serverSignal = NULL;
   CLOSE(tcp_pipe[1]);
   CLOSE(tcp_pipe[0]);
   if (tcp_sock != -1) {
@@ -1276,25 +1276,25 @@
   char * ret;
   HostAddress * haddr;
   size_t n;
-  
-  haddr = (HostAddress*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];  
+
+  haddr = (HostAddress*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
   n = 4*4+6+6;
   ret = MALLOC(n);
   SNPRINTF(ret,
           n,
           "%u.%u.%u.%u:%u (TCP)",
-          PRIP(ntohl(*(int*)&haddr->ip.addr)), 
+          PRIP(ntohl(*(int*)&haddr->ip.addr)),
           ntohs(haddr->port));
   return ret;
 }
 
- 
+
 /* ******************** public API ******************** */
- 
+
 /**
  * The exported method. Makes the core api available
  * via a global and returns the udp transport API.
- */ 
+ */
 TransportAPI * inittransport_tcp(CoreAPIForTransport * core) {
   MUTEX_CREATE_RECURSIVE(&tcplock);
   reloadConfiguration();
@@ -1324,9 +1324,9 @@
 
 void donetransport_tcp() {
   int i;
-  for (i=tsessionCount-1;i>=0;i--) 
-    destroySession(i); 
-  GROW(tsessions, 
+  for (i=tsessionCount-1;i>=0;i--)
+    destroySession(i);
+  GROW(tsessions,
        tsessionArrayLength,
        0);
   FREENONNULL(filteredNetworks_);

Modified: GNUnet/src/transports/tcp6.c
===================================================================
--- GNUnet/src/transports/tcp6.c        2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/transports/tcp6.c        2005-03-20 23:54:53 UTC (rev 464)
@@ -32,7 +32,7 @@
 
 /**
  * after how much time of the core not being associated with a tcp6
- * connection anymore do we close it? 
+ * connection anymore do we close it?
  */
 #define TCP6_TIMEOUT 30 * cronSECONDS
 
@@ -41,31 +41,31 @@
  */
 typedef struct {
   /**
-   * claimed IP of the sender, network byte order 
-   */  
+   * claimed IP of the sender, network byte order
+   */
   IP6addr ip;
 
   /**
-   * claimed port of the sender, network byte order 
+   * claimed port of the sender, network byte order
    */
-  unsigned short port; 
+  unsigned short port;
 
   /**
-   * reserved (set to 0 for signature verification) 
+   * reserved (set to 0 for signature verification)
    */
-  unsigned short reserved; 
+  unsigned short reserved;
 
 } Host6Address;
 
 /**
- * @brief TCP6 Message-Packet header. 
+ * @brief TCP6 Message-Packet header.
  */
 typedef struct {
   /**
-   * size of the message, in bytes, including this header; 
-   * max 65536-header (network byte order) 
+   * size of the message, in bytes, including this header;
+   * max 65536-header (network byte order)
    */
-  unsigned short size; 
+  unsigned short size;
 
   /**
    * For alignment, always 0.
@@ -80,8 +80,8 @@
  */
 typedef struct {
   /**
-   * size of the handshake message, in nbo, value is 24 
-   */    
+   * size of the handshake message, in nbo, value is 24
+   */
   unsigned short size;
 
   /**
@@ -90,7 +90,7 @@
   unsigned short version;
 
   /**
-   * Identity of the node connecting (TCP6 client) 
+   * Identity of the node connecting (TCP6 client)
    */
   PeerIdentity clientIdentity;
 } TCP6Welcome;
@@ -100,12 +100,12 @@
  */
 typedef struct {
   /**
-   * the tcp6 socket 
+   * the tcp6 socket
    */
   int sock;
 
   /**
-   * number of users of this session 
+   * number of users of this session
    */
   int users;
 
@@ -115,7 +115,7 @@
   cron_t lastUse;
 
   /**
-   * mutex for synchronized access to 'users' 
+   * mutex for synchronized access to 'users'
    */
   Mutex lock;
 
@@ -133,7 +133,7 @@
   /**
    * Current read position in the buffer.
    */
-  unsigned int pos;  
+  unsigned int pos;
 
   /**
    * Current size of the buffer.
@@ -165,14 +165,14 @@
 /* *********** globals ************* */
 
 /**
- * apis (our advertised API and the core api ) 
+ * apis (our advertised API and the core api )
  */
 static CoreAPIForTransport * coreAPI;
 static TransportAPI tcp6API;
 
 /**
  * one thread for listening for new connections,
- * and for reading on all open sockets 
+ * and for reading on all open sockets
  */
 static PTHREAD_T listenThread;
 
@@ -190,7 +190,7 @@
 static int tcp6_pipe[2];
 
 /**
- * Array of currently active TCP6 sessions. 
+ * Array of currently active TCP6 sessions.
  */
 static TSession ** tsessions = NULL;
 static int tsessionCount;
@@ -294,7 +294,7 @@
  *
  * @param i index to the session handle
  */
-static void destroySession(int i) {  
+static void destroySession(int i) {
   TCP6Session * tcp6Session;
 
   tcp6Session = tsessions[i]->internal;
@@ -310,7 +310,7 @@
 
 /**
  * Get the GNUnet UDP port from the configuration,
- * or from /etc/services if it is not specified in 
+ * or from /etc/services if it is not specified in
  * the config file.
  */
 static unsigned short getGNUnetTCP6Port() {
@@ -320,8 +320,8 @@
   port = (unsigned short) getConfigurationInt("TCP6",
                                              "PORT");
   if (port == 0) { /* try lookup in services */
-    if ((pse = getservbyname("gnunet", "tcp6"))) 
-      port = htons(pse->s_port);      
+    if ((pse = getservbyname("gnunet", "tcp6")))
+      port = htons(pse->s_port);
   }
   return port;
 }
@@ -338,7 +338,7 @@
  * for eventually freeing resources associated with the tesession). If
  * session is not NULL, the core takes responsbility for eventually
  * calling disconnect.
- * 
+ *
  * @param tsession the session handle passed along
  *   from the call to receive that was made by the transport
  *   layer
@@ -358,7 +358,7 @@
 
 /**
  * The socket of session i has data waiting, process!
- * 
+ *
  * This function may only be called if the tcp6lock is
  * already held by the caller.
  */
@@ -395,12 +395,12 @@
   }
   if (ret < 0) {
     if ( (errno == EINTR) ||
-        (errno == EAGAIN) ) { 
+        (errno == EAGAIN) ) {
 #if DEBUG_TCP
       LOG_STRERROR(LOG_DEBUG, "read");
 #endif
       tcp6Disconnect(tsession);
-      return OK;    
+      return OK;
     }
 #if DEBUG_TCP
     LOG_STRERROR(LOG_INFO, "read");
@@ -410,7 +410,7 @@
   }
   incrementBytesReceived(ret);
   tcp6Session->pos += ret;
-  
+
   while (tcp6Session->pos > 2) {
     len = ntohs(((TCP6MessagePack*)&tcp6Session->rbuff[0])->size) + 
sizeof(TCP6MessagePack);
     if (len > tcp6Session->rsize) /* if MTU larger than expected, grow! */
@@ -421,21 +421,21 @@
     LOG(LOG_DEBUG,
        "Read %d bytes on socket %d, expecting %d for full message\n",
        tcp6Session->pos,
-       tcp6Session->sock, 
+       tcp6Session->sock,
        len);
 #endif
     if (tcp6Session->pos < len) {
       tcp6Disconnect(tsession);
       return OK;
     }
-    
+
     /* complete message received, let's check what it is */
     if (YES == tcp6Session->expectingWelcome) {
       TCP6Welcome * welcome;
 #if DEBUG_TCP6
       EncName hex;
 #endif
-      
+
       welcome = (TCP6Welcome*) &tcp6Session->rbuff[0];
       if ( (ntohs(welcome->version) != 0) ||
           (ntohs(welcome->size) != sizeof(TCP6Welcome)) ) {
@@ -457,15 +457,15 @@
       memmove(&tcp6Session->rbuff[0],
              &tcp6Session->rbuff[sizeof(TCP6Welcome)],
              tcp6Session->pos - sizeof(TCP6Welcome));
-      tcp6Session->pos -= sizeof(TCP6Welcome); 
+      tcp6Session->pos -= sizeof(TCP6Welcome);
       len = ntohs(((TCP6MessagePack*)&tcp6Session->rbuff[0])->size) + 
sizeof(TCP6MessagePack);
-    } 
+    }
     if ( (tcp6Session->pos < 2) ||
         (tcp6Session->pos < len) ) {
       tcp6Disconnect(tsession);
       return OK;
     }
-    
+
     pack = (TCP6MessagePack*)&tcp6Session->rbuff[0];
     /* send msg to core! */
     if (len <= sizeof(TCP6MessagePack)) {
@@ -488,8 +488,8 @@
        mp->size);
 #endif
     coreAPI->receive(mp);
-    
-    if (tcp6Session->pos < len) { 
+
+    if (tcp6Session->pos < len) {
       BREAK();
       tcp6Disconnect(tsession);
       return SYSERR;
@@ -498,14 +498,14 @@
     memmove(&tcp6Session->rbuff[0],
            &tcp6Session->rbuff[len],
            tcp6Session->pos - len);
-    tcp6Session->pos -= len;      
+    tcp6Session->pos -= len;   
     if ( (tcp6Session->pos * 4 < tcp6Session->rsize) &&
         (tcp6Session->rsize > 4 * 1024) ) {
       /* read buffer far too large, shrink! */
       GROW(tcp6Session->rbuff,
           tcp6Session->rsize,
           tcp6Session->pos + 1024);
-    }  
+    }
   }
   tcp6Disconnect(tsession);
   return OK;
@@ -522,7 +522,7 @@
   int i;
 
   MUTEX_LOCK(&tcp6lock);
-  if (tsessionCount == tsessionArrayLength) 
+  if (tsessionCount == tsessionArrayLength)
     GROW(tsessions,
         tsessionArrayLength,
         tsessionArrayLength * 2);
@@ -548,7 +548,7 @@
   tcp6Session->wpos = 0;
   tcp6Session->wbuff = NULL;
   tcp6Session->sock = sock;
-  /* fill in placeholder identity to mark that we 
+  /* fill in placeholder identity to mark that we
      are waiting for the welcome message */
   tcp6Session->sender = *(coreAPI->myIdentity);
   tcp6Session->expectingWelcome = YES;
@@ -559,7 +559,7 @@
   tsession->ttype = TCP6_PROTOCOL_NUMBER;
   tsession->internal = tcp6Session;
   addTSession(tsession);
-}                                       
+}                                      
 
 /**
  * Main method for the thread listening on the tcp6 socket and all tcp6
@@ -578,9 +578,9 @@
   int i;
   int max;
   int ret;
-  
+
   if (tcp6_sock != -1)
-    if (0 != LISTEN(tcp6_sock, 5)) 
+    if (0 != LISTEN(tcp6_sock, 5))
       LOG_STRERROR(LOG_ERROR, "listen");
   SEMAPHORE_UP(serverSignal); /* we are there! */
   MUTEX_LOCK(&tcp6lock);
@@ -628,13 +628,13 @@
       }
       if (sock > max)
        max = sock;
-    }    
+    }
     MUTEX_UNLOCK(&tcp6lock);
-    ret = SELECT(max+1, &readSet, &writeSet, &errorSet, NULL);    
+    ret = SELECT(max+1, &readSet, &writeSet, &errorSet, NULL);
     MUTEX_LOCK(&tcp6lock);
     if ( (ret == -1) &&
-        ( (errno == EAGAIN) || (errno == EINTR) ) ) 
-      continue;    
+        ( (errno == EAGAIN) || (errno == EINTR) ) )
+      continue;
     if (ret == -1) {
       if (errno == EBADF) {
        LOG_STRERROR(LOG_ERROR, "select");
@@ -647,13 +647,13 @@
        int sock;
        
        lenOfIncomingAddr = sizeof(clientAddr);
-       sock = ACCEPT(tcp6_sock, 
-                     (struct sockaddr *)&clientAddr, 
+       sock = ACCEPT(tcp6_sock,
+                     (struct sockaddr *)&clientAddr,
                      &lenOfIncomingAddr);
-       if (sock != -1) {         
+       if (sock != -1) {       
          /* verify clientAddr for eligibility here (ipcheck-style,
             user should be able to specify who is allowed to connect,
-            otherwise we just close and reject the communication! */     
+            otherwise we just close and reject the communication! */   
          GNUNET_ASSERT(sizeof(struct in6_addr) == sizeof(IP6addr));
          if (YES == isBlacklisted((IP6addr*)&clientAddr.sin6_addr)) {
            char * tmp = MALLOC(INET6_ADDRSTRLEN);
@@ -666,8 +666,8 @@
            FREE(tmp);
            SHUTDOWN(sock, 2);
            CLOSE(sock);
-         } else 
-           createNewSession(sock);      
+         } else
+           createNewSession(sock);
        } else {
          LOG_STRERROR(LOG_INFO, "accept");
        }
@@ -680,8 +680,8 @@
 #define MAXSIG_BUF 128
       char buf[MAXSIG_BUF];
       /* just a signal to refresh sets, eat and continue */
-      if (0 >= READ(tcp6_pipe[0], 
-                   &buf[0], 
+      if (0 >= READ(tcp6_pipe[0],
+                   &buf[0],
                    MAXSIG_BUF)) {
        LOG_STRERROR(LOG_WARNING, "read");
       }
@@ -754,7 +754,7 @@
     tcp6_sock = -1;
   }
   /* close all sessions */
-  while (tsessionCount > 0) 
+  while (tsessionCount > 0)
     destroySession(0);
   MUTEX_UNLOCK(&tcp6lock);
   SEMAPHORE_UP(serverSignal); /* we are there! */
@@ -806,8 +806,8 @@
   }
   if (success == NO)
     ret = 0;
-  
-  if (ret < ssize) { /* partial send */    
+
+  if (ret < ssize) { /* partial send */
     if (tcp6Session->wsize < ssize - ret) {
       GROW(tcp6Session->wbuff,
           tcp6Session->wsize,
@@ -817,7 +817,7 @@
           mp,
           ssize - ret);
     tcp6Session->wpos = ssize - ret;
-    signalSelect(); /* select set changed! */    
+    signalSelect(); /* select set changed! */
   }
   MUTEX_UNLOCK(&tcp6lock);
   cronTime(&tcp6Session->lastUse);
@@ -861,7 +861,7 @@
         tcp6Session->wpos + ssize);
     memcpy(&tcp6Session->wbuff[old],
           mp,
-          ssize);    
+          ssize);
     ok = OK;
   } else {
     ok = tcp6DirectSend(tcp6Session,
@@ -885,7 +885,7 @@
                           const unsigned int size) {
   TCP6MessagePack * mp;
   int ok;
-  
+
   if (size >= MAX_BUFFER_SIZE)
     return SYSERR;
   if (tcp6_shutdown == YES)
@@ -914,7 +914,7 @@
  * Verify that a HELO-Message is correct (a node
  * is reachable at that address). Since the reply
  * will be asynchronous, a method must be called on
- * success. 
+ * success.
  * @param helo the HELO message to verify
  *        (the signature/crc have been verified before)
  * @return OK on success, SYSERR on error
@@ -936,7 +936,7 @@
 /**
  * Create a HELO-Message for the current node. The HELO is
  * created without signature and without a timestamp. The
- * GNUnet core will sign the message and add an expiration time. 
+ * GNUnet core will sign the message and add an expiration time.
  *
  * @param helo address where to store the pointer to the HELO
  *        message
@@ -962,7 +962,7 @@
        _("Could not determine my public IPv6 address.\n"));
     return SYSERR;
   }
-  haddr->port = htons(port); 
+  haddr->port = htons(port);
   haddr->reserved = htons(0);
   msg->senderAddressSize = htons(sizeof(Host6Address));
   msg->protocol = htons(TCP6_PROTOCOL_NUMBER);
@@ -1008,9 +1008,9 @@
            INET6_ADDRSTRLEN);
   rtn = getaddrinfo(hostname, NULL, &hints, &res0);
   FREE(hostname);
-  if (rtn != 0) {    
+  if (rtn != 0) {
     LOG(LOG_WARNING,   
-       _("'%s': unknown service: %s\n"), 
+       _("'%s': unknown service: %s\n"),
        __FUNCTION__,
        gai_strerror(rtn));
     return SYSERR;
@@ -1023,7 +1023,7 @@
       inet_ntop(AF_INET6,
                haddr,
                tmp,
-               INET6_ADDRSTRLEN), 
+               INET6_ADDRSTRLEN),
       ntohs(haddr->port));
   FREE(tmp);
 #endif
@@ -1032,8 +1032,8 @@
   for (res=res0; res; res=res->ai_next) {
     if (res->ai_family != PF_INET6)
       continue;
-    sock = SOCKET(res->ai_family, 
-                 res->ai_socktype, 
+    sock = SOCKET(res->ai_family,
+                 res->ai_socktype,
                  res->ai_protocol);
     if (sock < 0)
       continue;
@@ -1042,10 +1042,10 @@
       LOG_STRERROR(LOG_FAILURE, "setBlocking");
       return SYSERR;
     }
-    ((struct sockaddr_in6*)(res->ai_addr))->sin6_port 
+    ((struct sockaddr_in6*)(res->ai_addr))->sin6_port
       = haddr->port;
-    i = CONNECT(sock, 
-               res->ai_addr, 
+    i = CONNECT(sock,
+               res->ai_addr,
                res->ai_addrlen);
     if ( (i < 0) &&
         (errno != EINPROGRESS) ) {
@@ -1103,7 +1103,7 @@
   }
   MUTEX_UNLOCK(&tcp6lock);
   signalSelect();
-  
+
   *tsessionPtr = tsession;
   FREE(helo);
   return OK;
@@ -1122,7 +1122,7 @@
                    const unsigned int size) {
   TCP6MessagePack * mp;
   int ok;
-  
+
   if (size >= MAX_BUFFER_SIZE)
     return SYSERR;
   if (tcp6_shutdown == YES)
@@ -1154,14 +1154,14 @@
   struct sockaddr_in6 serverAddr;
   const int on = 1;
   unsigned short port;
-  
+
   if (serverSignal != NULL) {
     BREAK();
     return SYSERR;
   }
   serverSignal = SEMAPHORE_NEW(0);
   tcp6_shutdown = NO;
-    
+
   if (0 != PIPE(tcp6_pipe)) {
     LOG_STRERROR(LOG_ERROR, "pipe");
     return SYSERR;
@@ -1171,25 +1171,25 @@
   port = getGNUnetTCP6Port();
   if (port != 0) { /* if port == 0, this is a read-only
                      business! */
-    tcp6_sock = SOCKET(PF_INET6, 
-                      SOCK_STREAM, 
-                      0);   
+    tcp6_sock = SOCKET(PF_INET6,
+                      SOCK_STREAM,
+                      0);
     if (tcp6_sock < 0) {
       LOG_STRERROR(LOG_FAILURE, "socket");
       CLOSE(tcp6_pipe[0]);
       CLOSE(tcp6_pipe[1]);
       SEMAPHORE_FREE(serverSignal);
-      serverSignal = NULL;      
+      serverSignal = NULL;
       tcp6_shutdown = YES;
       return SYSERR;
     }
     if (SETSOCKOPT(tcp6_sock,
-                  SOL_SOCKET, 
-                  SO_REUSEADDR, 
-                  &on, 
-                  sizeof(on)) < 0 ) 
+                  SOL_SOCKET,
+                  SO_REUSEADDR,
+                  &on,
+                  sizeof(on)) < 0 )
       DIE_STRERROR("setsockopt");
-    memset((char *) &serverAddr, 
+    memset((char *) &serverAddr,
           0,
           sizeof(serverAddr));
     serverAddr.sin6_family   = AF_INET6;
@@ -1201,7 +1201,7 @@
        "starting tcp6 peer server on port %d\n",
        ntohs(serverAddr.sin6_port));
 #endif
-    if (BIND(tcp6_sock, 
+    if (BIND(tcp6_sock,
             (struct sockaddr *) &serverAddr,
             sizeof(serverAddr)) < 0) {
       LOG_STRERROR(LOG_ERROR, "bind");
@@ -1216,11 +1216,11 @@
     }
   } else
     tcp6_sock = -1;
-  if (0 == PTHREAD_CREATE(&listenThread, 
+  if (0 == PTHREAD_CREATE(&listenThread,
                          (PThreadMain) &tcp6ListenMain,
                          NULL,
                          4092)) {
-    SEMAPHORE_DOWN(serverSignal); /* wait for server to be up */      
+    SEMAPHORE_DOWN(serverSignal); /* wait for server to be up */
   } else {
     LOG_STRERROR(LOG_ERROR,
                 "pthread_create");
@@ -1242,7 +1242,7 @@
 
   if (tcp6_shutdown == YES)
     return OK;
-  tcp6_shutdown = YES;  
+  tcp6_shutdown = YES;
   signalSelect();
   if (serverSignal != NULL) {
     haveThread = YES;
@@ -1250,7 +1250,7 @@
     SEMAPHORE_FREE(serverSignal);
   } else
     haveThread = NO;
-  serverSignal = NULL; 
+  serverSignal = NULL;
   CLOSE(tcp6_pipe[1]);
   CLOSE(tcp6_pipe[0]);
   if (tcp6_sock != -1) {
@@ -1289,29 +1289,29 @@
   char * ret;
   char * tmp;
   Host6Address * haddr;
-  
-  haddr = (Host6Address*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];  
+
+  haddr = (Host6Address*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
   ret = MALLOC(INET6_ADDRSTRLEN+16);
-  tmp = MALLOC(INET6_ADDRSTRLEN);  
+  tmp = MALLOC(INET6_ADDRSTRLEN);
   SNPRINTF(ret,
           INET6_ADDRSTRLEN+16,
           "%s:%d (TCP6)",
           inet_ntop(AF_INET6,
                     haddr,
                     tmp,
-                    INET6_ADDRSTRLEN), 
+                    INET6_ADDRSTRLEN),
           ntohs(haddr->port));
   FREE(tmp);
   return ret;
 }
 
- 
+
 /* ******************** public API ******************** */
- 
+
 /**
  * The exported method. Makes the core api available
  * via a global and returns the udp transport API.
- */ 
+ */
 TransportAPI * inittransport_tcp6(CoreAPIForTransport * core) {
   MUTEX_CREATE_RECURSIVE(&tcp6lock);
   reloadConfiguration();

Modified: GNUnet/src/transports/udp.c
===================================================================
--- GNUnet/src/transports/udp.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/transports/udp.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -35,32 +35,32 @@
  */
 typedef struct {
   /**
-   * claimed IP of the sender, network byte order 
-   */  
+   * claimed IP of the sender, network byte order
+   */
   IPaddr senderIP;
 
   /**
-   * claimed port of the sender, network byte order 
+   * claimed port of the sender, network byte order
    */
-  unsigned short senderPort; 
+  unsigned short senderPort;
 
   /**
-   * reserved (set to 0 for signature verification) 
+   * reserved (set to 0 for signature verification)
    */
-  unsigned short reserved; 
+  unsigned short reserved;
 
 } HostAddress;
 
 /**
- * Message-Packet header. 
+ * Message-Packet header.
  */
 typedef struct {
   /**
    * this struct is *preceded* by MESSAGE_PARTs - until
    * size-sizeof(UDPMessage)!
-   */ 
+   */
 
-  /** 
+  /**
    * size of the message, in bytes, including this header.
    */
   unsigned short size;
@@ -71,7 +71,7 @@
   unsigned short reserved;
 
   /**
-   * What is the identity of the sender (hash of public key) 
+   * What is the identity of the sender (hash of public key)
    */
   PeerIdentity sender;
 
@@ -84,12 +84,12 @@
 static TransportAPI udpAPI;
 
 /**
- * thread that listens for inbound messages 
+ * thread that listens for inbound messages
  */
 static PTHREAD_T dispatchThread;
 
 /**
- * the socket that we receive all data from 
+ * the socket that we receive all data from
  */
 static int udp_sock = -1;
 
@@ -101,7 +101,7 @@
 static int udp_shutdown = YES;
 
 /**
- * configuration 
+ * configuration
  */
 static struct CIDRNetwork * filteredNetworks_ = NULL;
 static Mutex configLock;
@@ -127,13 +127,13 @@
   port = (unsigned short) getConfigurationInt("UDP",
                                              "PORT");
   if (port == 0) { /* try lookup in services */
-    if ((pse = getservbyname("gnunet", "udp"))) 
-      port = ntohs(pse->s_port);      
-    else 
+    if ((pse = getservbyname("gnunet", "udp")))
+      port = ntohs(pse->s_port);
+    else
       errexit(_("Cannot determine port to bind to. "
                " Define in configuration file in section '%s' under '%s' "
                "or in '%s' under %s/%s.\n"),
-             "UDP", 
+             "UDP",
              "PORT",
              "/etc/services",
              "udp",
@@ -151,17 +151,17 @@
   const int on = 1;
 
   sock = SOCKET(PF_INET, SOCK_DGRAM, UDP_PROTOCOL_NUMBER);
-  if (sock < 0) 
+  if (sock < 0)
     DIE_STRERROR("socket");
   if ( SETSOCKOPT(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0 )
     DIE_STRERROR("setsockopt");
   if (port != 0) {
-    memset(&sin, 0, sizeof(sin)); 
+    memset(&sin, 0, sizeof(sin));
     sin.sin_family      = AF_INET;
     sin.sin_addr.s_addr = INADDR_ANY;
     sin.sin_port        = htons(port);
-    if (BIND(sock, 
-            (struct sockaddr *)&sin, 
+    if (BIND(sock,
+            (struct sockaddr *)&sin,
             sizeof(sin)) < 0) {
       LOG_STRERROR(LOG_FATAL, "bind");
       errexit(_("Failed to bind to UDP port %d.\n"),
@@ -191,7 +191,7 @@
  */
 static void * listenAndDistribute() {
   struct sockaddr_in incoming;
-  socklen_t addrlen = sizeof(incoming);  
+  socklen_t addrlen = sizeof(incoming);
   int size;
   EncName enc;
   MessagePack * mp;
@@ -203,24 +203,24 @@
     mp = MALLOC(sizeof(MessagePack));
     mp->msg = MALLOC(udpAPI.mtu + sizeof(UDPMessage));
   RETRY:
-    memset(&incoming, 
-          0, 
+    memset(&incoming,
+          0,
           sizeof(struct sockaddr_in));
     if (udp_shutdown == YES) {
       FREE(mp->msg);
       FREE(mp);
       break;
     }
-    size = RECVFROM(udp_sock, 
-                   mp->msg, 
-                   udpAPI.mtu + sizeof(UDPMessage), 
+    size = RECVFROM(udp_sock,
+                   mp->msg,
+                   udpAPI.mtu + sizeof(UDPMessage),
                    0,
-                   (struct sockaddr * )&incoming, 
+                   (struct sockaddr * )&incoming,
                    &addrlen);
-    if ( (size < 0) || 
+    if ( (size < 0) ||
         (udp_shutdown == YES) ) {
       if (udp_shutdown == NO) {
-       if ( (errno == EINTR) || 
+       if ( (errno == EINTR) ||
             (errno == EAGAIN) ||
             (errno == ECONNREFUSED) )
          goto RETRY;
@@ -274,7 +274,7 @@
     }
     /* message ok, fill in mp and pass to core */
     mp->tsession = NULL;
-    mp->size     = ntohs(udpm.size) - sizeof(UDPMessage);    
+    mp->size     = ntohs(udpm.size) - sizeof(UDPMessage);
     mp->sender   = udpm.sender;
     coreAPI->receive(mp);
   }
@@ -308,9 +308,9 @@
 #if DEBUG_UDP
     LOG(LOG_DEBUG,
        "Verified UDP helo from %u.%u.%u.%u:%u.\n",
-       PRIP(ntohl(*(int*)&haddr->senderIP.addr)), 
+       PRIP(ntohl(*(int*)&haddr->senderIP.addr)),
        ntohs(haddr->senderPort));
-#endif    
+#endif
     return OK;
   }
 }
@@ -329,7 +329,7 @@
 
   if ( ( (udp_shutdown == YES) && (getGNUnetUDPPort() == 0) ) ||
        ( (udp_shutdown == NO) && (port == 0) ) )
-    return SYSERR; /* UDP transport configured send-only */  
+    return SYSERR; /* UDP transport configured send-only */
 
   msg = MALLOC(sizeof(HELO_Message) + sizeof(HostAddress));
   haddr = (HostAddress*) &((HELO_Message_GENERIC*)msg)->senderAddress[0];
@@ -341,9 +341,9 @@
     return SYSERR;
   }
   if (udp_shutdown == YES)
-    haddr->senderPort      = htons(getGNUnetUDPPort()); 
+    haddr->senderPort      = htons(getGNUnetUDPPort());
   else
-    haddr->senderPort      = htons(port); 
+    haddr->senderPort      = htons(port);
   haddr->reserved        = htons(0);
   msg->senderAddressSize = htons(sizeof(HostAddress));
   msg->protocol          = htons(UDP_PROTOCOL_NUMBER);
@@ -362,15 +362,15 @@
                      TSession ** tsessionPtr) {
   TSession * tsession;
   HostAddress * haddr;
-  
+
   tsession = MALLOC(sizeof(TSession));
   tsession->internal = helo;
   tsession->ttype = udpAPI.protocolNumber;
-  haddr = (HostAddress*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];  
+  haddr = (HostAddress*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
 #if DEBUG_UDP
   LOG(LOG_DEBUG,
       "Connecting via UDP to %u.%u.%u.%u:%u.\n",
-      PRIP(ntohl(*(int*)&haddr->senderIP.addr)), 
+      PRIP(ntohl(*(int*)&haddr->senderIP.addr)),
       ntohs(haddr->senderPort));
 #endif
    (*tsessionPtr) = tsession;
@@ -410,7 +410,7 @@
   struct sockaddr_in sin; /* an Internet endpoint address */
   int ok;
   int ssize;
-  
+
   if (udp_shutdown == YES)
     return SYSERR;
   if (size == 0) {
@@ -422,7 +422,7 @@
     return SYSERR;
   }
   helo = (HELO_Message*)tsession->internal;
-  if (helo == NULL) 
+  if (helo == NULL)
     return SYSERR;
 
   haddr = (HostAddress*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
@@ -441,7 +441,7 @@
   memset(&sin, 0, sizeof(sin));
   sin.sin_family = AF_INET;
   sin.sin_port = haddr->senderPort;
-  
+
   GNUNET_ASSERT(sizeof(struct in_addr) == sizeof(IPaddr));
   memcpy(&sin.sin_addr,
         &haddr->senderIP,
@@ -450,7 +450,7 @@
   LOG(LOG_DEBUG,
       "Sending message of %d bytes via UDP to %u.%u.%u.%u:%u.\n",
       ssize,
-      PRIP(ntohl(*(int*)&sin.sin_addr)), 
+      PRIP(ntohl(*(int*)&sin.sin_addr)),
       ntohs(sin.sin_port));
 #endif
   if (ssize == SENDTO(udp_sock,
@@ -464,7 +464,7 @@
     LOG(LOG_WARNING,
        _("Failed to send message of size %d via UDP to %u.%u.%u.%u:%u: %s\n"),
        ssize,
-       PRIP(ntohl(*(int*)&sin.sin_addr)), 
+       PRIP(ntohl(*(int*)&sin.sin_addr)),
        ntohs(sin.sin_port),
        STRERROR(errno));
   }
@@ -522,7 +522,7 @@
  * restarted later!
  */
 static int stopTransportServer() {
-  GNUNET_ASSERT(udp_sock != -1);    
+  GNUNET_ASSERT(udp_sock != -1);
   if (udp_shutdown == NO) {
     /* stop the thread, first set shutdown
        to YES, then ensure that the thread
@@ -534,17 +534,17 @@
       struct sockaddr_in sin;
       void * unused;
       int mySock;
-      
+
       mySock = SOCKET(PF_INET, SOCK_DGRAM, UDP_PROTOCOL_NUMBER);
-      if (mySock < 0) 
+      if (mySock < 0)
        DIE_STRERROR("socket");
       /* send to loopback */
       sin.sin_family = AF_INET;
       sin.sin_port = htons(port);
       *(int*)&sin.sin_addr = htonl(0x7F000001); /* 127.0.0.1 = localhost */
-      SENDTO(mySock, 
-            &msg, 
-            sizeof(msg), 
+      SENDTO(mySock,
+            &msg,
+            sizeof(msg),
             0,
             (struct sockaddr*) &sin,
             sizeof(sin));
@@ -553,8 +553,8 @@
       PTHREAD_JOIN(&dispatchThread, &unused);
     }
   }
-  CLOSE(udp_sock);  
-  udp_sock = -1;  
+  CLOSE(udp_sock);
+  udp_sock = -1;
   return OK;
 }
 
@@ -572,7 +572,7 @@
     filteredNetworks_ = parseRoutes("");
   else {
     filteredNetworks_ = parseRoutes(ch);
-    FREE(ch);    
+    FREE(ch);
   }
   MUTEX_UNLOCK(&configLock);
 }
@@ -584,20 +584,20 @@
   char * ret;
   HostAddress * haddr;
   size_t n;
-  
-  haddr = (HostAddress*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];  
+
+  haddr = (HostAddress*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
   n = 4*4+6+6;
   ret = MALLOC(n);
   SNPRINTF(ret,
           n,
           "%u.%u.%u.%u:%u (UDP)",
-          PRIP(ntohl(*(int*)&haddr->senderIP.addr)), 
+          PRIP(ntohl(*(int*)&haddr->senderIP.addr)),
           ntohs(haddr->senderPort));
   return ret;
 }
 
 /**
- * The default maximum size of each outbound UDP message, 
+ * The default maximum size of each outbound UDP message,
  * optimal value for Ethernet (10 or 100 MBit).
  */
 #define MESSAGE_SIZE 1472
@@ -605,7 +605,7 @@
 /**
  * The exported method. Makes the core api available via a global and
  * returns the udp transport API.
- */ 
+ */
 TransportAPI * inittransport_udp(CoreAPIForTransport * core) {
   int mtu;
 

Modified: GNUnet/src/transports/udp6.c
===================================================================
--- GNUnet/src/transports/udp6.c        2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/transports/udp6.c        2005-03-20 23:54:53 UTC (rev 464)
@@ -35,39 +35,39 @@
  */
 typedef struct {
   /**
-   * claimed IP of the sender, network byte order 
-   */  
+   * claimed IP of the sender, network byte order
+   */
   IP6addr senderIP;
 
   /**
-   * claimed port of the sender, network byte order 
+   * claimed port of the sender, network byte order
    */
-  unsigned short senderPort; 
+  unsigned short senderPort;
 
   /**
-   * reserved (set to 0 for signature verification) 
+   * reserved (set to 0 for signature verification)
    */
-  unsigned short reserved; 
+  unsigned short reserved;
 
 } Host6Address;
 
 /**
- * Message-Packet header. 
+ * Message-Packet header.
  */
 typedef struct {
   /**
    * this struct is *preceded* by MESSAGE_PARTs - until
    * size-sizeof(UDP6Message)!
-   */ 
+   */
 
-  /** 
+  /**
    * size of the message, in bytes, including this header; max
    * 65536-header (network byte order)
    */
   unsigned short size;
 
   /**
-   * What is the identity of the sender (hash of public key) 
+   * What is the identity of the sender (hash of public key)
    */
   PeerIdentity sender;
 
@@ -80,12 +80,12 @@
 static TransportAPI udp6API;
 
 /**
- * thread that listens for inbound messages 
+ * thread that listens for inbound messages
  */
 static PTHREAD_T dispatchThread;
 
 /**
- * the socket that we receive all data from 
+ * the socket that we receive all data from
  */
 static int udp6_sock;
 
@@ -97,7 +97,7 @@
 static int udp6_shutdown = YES;
 
 /**
- * configuration 
+ * configuration
  */
 static struct CIDR6Network * filteredNetworks_ = NULL;
 static Mutex configLock;
@@ -115,13 +115,13 @@
   port = (unsigned short) getConfigurationInt("UDP6",
                                              "PORT");
   if (port == 0) { /* try lookup in services */
-    if ((pse = getservbyname("gnunet", "udp6"))) 
-      port = ntohs(pse->s_port);      
-    else 
+    if ((pse = getservbyname("gnunet", "udp6")))
+      port = ntohs(pse->s_port);
+    else
       errexit(_("Cannot determine port to bind to. "
                " Define in configuration file in section '%s' under '%s' "
                "or in '%s' under %s/%s.\n"),
-             "UDP6", 
+             "UDP6",
              "PORT",
              "/etc/services",
              "udp6",
@@ -138,15 +138,15 @@
   int sock;
   const int on = 1;
 
-  sock = SOCKET(PF_INET6, 
-               SOCK_DGRAM, 
+  sock = SOCKET(PF_INET6,
+               SOCK_DGRAM,
                UDP_PROTOCOL_NUMBER);
-  if (sock < 0) 
+  if (sock < 0)
     DIE_STRERROR("socket");
   if ( SETSOCKOPT(sock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0 )
     DIE_STRERROR("setsockopt");
   if (port != 0) {
-    memset(&sin, 0, sizeof(sin)); 
+    memset(&sin, 0, sizeof(sin));
     sin.sin6_family = AF_INET6;
     sin.sin6_port   = htons(port);
     memcpy(&sin.sin6_addr,
@@ -181,7 +181,7 @@
  */
 static void * listenAndDistribute() {
   struct sockaddr_in6 incoming;
-  socklen_t addrlen = sizeof(incoming);  
+  socklen_t addrlen = sizeof(incoming);
   int size;
   EncName enc;
   MessagePack * mp;
@@ -193,24 +193,24 @@
     mp = MALLOC(sizeof(MessagePack));
     mp->msg = MALLOC(udp6API.mtu + sizeof(UDP6Message));
   RETRY:
-    memset(&incoming, 
-          0, 
+    memset(&incoming,
+          0,
           sizeof(struct sockaddr_in6));
     if (udp6_shutdown == YES) {
       FREE(mp->msg);
       FREE(mp);
       break;
     }
-    size = RECVFROM(udp6_sock, 
-                   mp->msg, 
-                   udp6API.mtu + sizeof(UDP6Message), 
+    size = RECVFROM(udp6_sock,
+                   mp->msg,
+                   udp6API.mtu + sizeof(UDP6Message),
                    0,
-                   (struct sockaddr * )&incoming, 
+                   (struct sockaddr * )&incoming,
                    &addrlen);
-    if ( (size < 0) || 
+    if ( (size < 0) ||
         (udp6_shutdown == YES) ) {
       if (udp6_shutdown == NO) {
-       if ( (errno == EINTR) || 
+       if ( (errno == EINTR) ||
             (errno == EAGAIN) ||
             (errno == ECONNREFUSED) )
          goto RETRY;
@@ -229,7 +229,7 @@
          inet_ntop(AF_INET6,
                    &incoming,
                    tmp,
-                   INET6_ADDRSTRLEN), 
+                   INET6_ADDRSTRLEN),
          ntohs(incoming.sin6_port));
       FREE(tmp);
       goto RETRY;
@@ -249,7 +249,7 @@
        inet_ntop(AF_INET6,
                  &incoming,
                  tmp,
-                 INET6_ADDRSTRLEN), 
+                 INET6_ADDRSTRLEN),
        ntohs(incoming.sin6_port),
        &enc);
     FREE(tmp);
@@ -262,7 +262,7 @@
          inet_ntop(AF_INET6,
                    &incoming,
                    tmp,
-                   INET6_ADDRSTRLEN), 
+                   INET6_ADDRSTRLEN),
          ntohs(incoming.sin6_port));
       FREE(tmp);
       goto RETRY;
@@ -281,7 +281,7 @@
     }
     /* message ok, fill in mp and pass to core */
     mp->tsession     = NULL;
-    mp->size        = ntohs(udp6m.size) - sizeof(UDP6Message);    
+    mp->size        = ntohs(udp6m.size) - sizeof(UDP6Message);
     memcpy(&mp->sender,
           &udp6m.sender,
           sizeof(PeerIdentity));
@@ -321,10 +321,10 @@
        inet_ntop(AF_INET6,
                  &haddr->senderIP,
                  tmp,
-                 INET6_ADDRSTRLEN), 
+                 INET6_ADDRSTRLEN),
        ntohs(haddr->senderPort));
     FREE(tmp);
-#endif    
+#endif
     return OK;
   }
 }
@@ -355,7 +355,7 @@
        _("UDP6: Could not determine my public IPv6 address.\n"));
     return SYSERR;
   }
-  haddr->senderPort      = htons(port); 
+  haddr->senderPort      = htons(port);
   haddr->reserved        = htons(0);
   msg->senderAddressSize = htons(sizeof(Host6Address));
   msg->protocol          = htons(UDP6_PROTOCOL_NUMBER);
@@ -381,7 +381,7 @@
   tsession = MALLOC(sizeof(TSession));
   tsession->internal = helo;
   tsession->ttype = udp6API.protocolNumber;
-  haddr = (Host6Address*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];  
+  haddr = (Host6Address*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
 #if DEBUG_UDP6
   tmp = MALLOC(INET6_ADDRSTRLEN);
   LOG(LOG_DEBUG,
@@ -389,7 +389,7 @@
       inet_ntop(AF_INET6,
                &haddr->senderIP,
                tmp,
-               INET6_ADDRSTRLEN), 
+               INET6_ADDRSTRLEN),
       ntohs(haddr->senderPort));
   FREE(tmp);
 #endif
@@ -433,7 +433,7 @@
 #if DEBUG_UDP6
   char * tmp;
 #endif
-  
+
   if (udp6_shutdown == YES)
     return SYSERR;
   if (size == 0) {
@@ -445,7 +445,7 @@
     return SYSERR;
   }
   helo = (HELO_Message*)tsession->internal;
-  if (helo == NULL) 
+  if (helo == NULL)
     return SYSERR;
 
   haddr = (Host6Address*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
@@ -476,7 +476,7 @@
       inet_ntop(AF_INET6,
                &sin,
                tmp,
-               INET6_ADDRSTRLEN), 
+               INET6_ADDRSTRLEN),
       ntohs(sin.sin_port));
   FREE(tmp);
 #endif
@@ -552,14 +552,14 @@
       char msg = '\0';
       struct sockaddr_in sin;
       void * unused;
-      
+
       /* send to loopback */
       sin.sin_family = AF_INET;
       sin.sin_port = htons(getGNUnetUDP6Port());
       *(int*)&sin.sin_addr = htonl(0x7F000001); /* 127.0.0.1 = localhost */
-      SENDTO(udp6_sock, 
-            &msg, 
-            sizeof(msg), 
+      SENDTO(udp6_sock,
+            &msg,
+            sizeof(msg),
             0, /* no flags */
             (struct sockaddr*) &sin,
             sizeof(sin));
@@ -568,7 +568,7 @@
       PTHREAD_JOIN(&dispatchThread, &unused);
     }
   }
-  CLOSE(udp6_sock);  
+  CLOSE(udp6_sock);
   udp6_sock = -1;
   return OK;
 }
@@ -587,7 +587,7 @@
     filteredNetworks_ = parseRoutes6("");
   else {
     filteredNetworks_ = parseRoutes6(ch);
-    FREE(ch);    
+    FREE(ch);
   }
   MUTEX_UNLOCK(&configLock);
 }
@@ -599,24 +599,24 @@
   char * ret;
   char * tmp;
   Host6Address * haddr;
-  
-  haddr = (Host6Address*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];  
+
+  haddr = (Host6Address*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
   ret = MALLOC(INET6_ADDRSTRLEN+16);
-  tmp = MALLOC(INET6_ADDRSTRLEN);  
+  tmp = MALLOC(INET6_ADDRSTRLEN);
   SNPRINTF(ret,
           INET6_ADDRSTRLEN+16,
           "%s:%d (UDP6)",
           inet_ntop(AF_INET6,
                     haddr,
                     tmp,
-                    INET6_ADDRSTRLEN), 
+                    INET6_ADDRSTRLEN),
           ntohs(haddr->senderPort));
   FREE(tmp);
   return ret;
 }
 
 /**
- * The default maximum size of each outbound UDP6 message, 
+ * The default maximum size of each outbound UDP6 message,
  * optimal value for Ethernet (10 or 100 MBit).
  */
 #define MESSAGE_SIZE 1452
@@ -624,7 +624,7 @@
 /**
  * The exported method. Makes the core api available via a global and
  * returns the udp6 transport API.
- */ 
+ */
 TransportAPI * inittransport_udp6(CoreAPIForTransport * core) {
   int mtu;
 

Modified: GNUnet/src/util/bloomfilter.c
===================================================================
--- GNUnet/src/util/bloomfilter.c       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/bloomfilter.c       2005-03-20 23:54:53 UTC (rev 464)
@@ -28,7 +28,7 @@
  *
  * A property of the bloom filter is that sometimes we will have
  * a match even if the element is not on the disk (then we do
- * an unnecessary disk access), but what's most important is that 
+ * an unnecessary disk access), but what's most important is that
  * we never get a single "false negative".
  *
  * To be able to delete entries from the bloom filter, we maintain
@@ -45,7 +45,7 @@
 typedef struct Bloomfilter {
   /** The bit counter file on disk */
   int fd;
-  /** How many bits we set for each stored element */  
+  /** How many bits we set for each stored element */
   unsigned int addressesPerElement;
   /** The actual bloomfilter bit array */
   char * bitArray;
@@ -59,34 +59,34 @@
 /**
  * Sets a bit active in the bitArray. Increment bit-specific
  * usage counter on disk only if below 4bit max (==15).
- * 
+ *
  * @param bitArray memory area to set the bit in
  * @param bitIdx which bit to set
  */
-static void setBit(char * bitArray, 
+static void setBit(char * bitArray,
                   unsigned int bitIdx) {
   unsigned int arraySlot;
   unsigned int targetBit;
 
   arraySlot = bitIdx / 8;
-  targetBit = (1L << (bitIdx % 8));  
+  targetBit = (1L << (bitIdx % 8));
   bitArray[arraySlot] |= targetBit;
 }
 
 /**
- * Clears a bit from bitArray. Bit is cleared from the array 
+ * Clears a bit from bitArray. Bit is cleared from the array
  * only if the respective usage counter on the disk hits/is zero.
  *
  * @param bitArray memory area to set the bit in
  * @param bitIdx which bit to unset
  */
-static void clearBit(char * bitArray, 
+static void clearBit(char * bitArray,
                     unsigned int bitIdx) {
   unsigned int slot;
   unsigned int targetBit;
 
   slot = bitIdx / 8;
-  targetBit = (1L << (bitIdx % 8)); 
+  targetBit = (1L << (bitIdx % 8));
   bitArray[slot] = bitArray[slot] & (~targetBit);
 }
 
@@ -97,30 +97,30 @@
  * @param bitIdx which bit to test
  * @return YES if the bit is set, NO if not.
  */
-static int testBit(char * bitArray, 
+static int testBit(char * bitArray,
                   unsigned int bitIdx) {
   unsigned int slot;
   unsigned int targetBit;
 
   slot = bitIdx / 8;
-  targetBit = (1L << (bitIdx % 8)); 
+  targetBit = (1L << (bitIdx % 8));
   if (bitArray[slot] & targetBit)
-    return YES;  
+    return YES;
   else
     return NO;
 }
 
 /**
  * Sets a bit active in the bitArray and increments
- * bit-specific usage counter on disk (but only if 
+ * bit-specific usage counter on disk (but only if
  * the counter was below 4 bit max (==15)).
- * 
+ *
  * @param bitArray memory area to set the bit in
  * @param bitIdx which bit to test
  * @param fd A file to keep the 4 bit address usage counters in
  */
-static void incrementBit(char * bitArray, 
-                        unsigned int bitIdx, 
+static void incrementBit(char * bitArray,
+                        unsigned int bitIdx,
                         int fd) {
   unsigned int fileSlot;
   unsigned char value;
@@ -133,17 +133,17 @@
   GNUNET_ASSERT(fd != -1);
   fileSlot = bitIdx / 2;
   targetLoc = bitIdx % 2;
-  
+
   if (fileSlot != (unsigned int) lseek(fd, fileSlot, SEEK_SET))
     DIE_STRERROR("lseek");
   value = 0;
-  READ(fd, 
-       &value, 
+  READ(fd,
+       &value,
        1);
-  
+
   low = value & 0xF;
   high = (value & (~0xF)) >> 4;
-  
+
   if (targetLoc == 0) {
     if (low < 0xF)
       low++;
@@ -159,14 +159,14 @@
 }
 
 /**
- * Clears a bit from bitArray if the respective usage 
+ * Clears a bit from bitArray if the respective usage
  * counter on the disk hits/is zero.
  *
  * @param bitArray memory area to set the bit in
  * @param bitIdx which bit to test
  * @param fd A file to keep the 4bit address usage counters in
  */
-static void decrementBit(char * bitArray, 
+static void decrementBit(char * bitArray,
                         unsigned int bitIdx,
                         int fd) {
   unsigned int fileSlot;
@@ -179,21 +179,21 @@
   /* Each char slot in the counter file holds two 4 bit counters */
   fileSlot = bitIdx / 2;
   targetLoc = bitIdx % 2;
-  
+
   lseek(fd, fileSlot, SEEK_SET);
   value = 0;
   READ(fd, &value, 1);
-  
+
   low  = value & 0xF;
   high = (value & 0xF0) >> 4;
-  
+
   /* decrement, but once we have reached the max, never go back! */
   if (targetLoc == 0) {
     if ( (low > 0) && (low < 0xF) )
       low--;
     if (low == 0) {
        clearBit(bitArray, bitIdx);
-    } 
+    }
   } else {
     if ( (high > 0) && (high < 0xF) )
       high--;
@@ -260,7 +260,7 @@
 typedef void (*BitIterator)(Bloomfilter * bf,
                            unsigned int bit,
                            void * arg);
-                           
+                       
 /**
  * Call an iterator for each bit that the bloomfilter
  * must test or set for this element.
@@ -286,8 +286,8 @@
   round = 0;
   while (bitCount > 0) {
     while (slot < (sizeof(HashCode512)/sizeof(unsigned int))) {
-      callback(bf, 
-              (((unsigned int*)&tmp[round&1])[slot]) & 
((bf->bitArraySize*8)-1), 
+      callback(bf,
+              (((unsigned int*)&tmp[round&1])[slot]) & 
((bf->bitArraySize*8)-1),
               arg);
       slot++;
       bitCount--;
@@ -337,7 +337,7 @@
 /**
  * Callback: test if all bits are set
  *
- * @param bf the filter 
+ * @param bf the filter
  * @param bit the bit to test
  * @param arg pointer set to NO if bit is not set
  */
@@ -370,8 +370,8 @@
   int i;
   unsigned int ui;
 
-  if ( (filename == NULL) || 
-       (k==0) || 
+  if ( (filename == NULL) ||
+       (k==0) ||
        (size==0) )
     return NULL;
   if (size < BUFFSIZE)
@@ -379,7 +379,7 @@
   ui = 1;
   while (ui < size)
     ui*=2;
-  size = ui; /* make sure it's a power of 2 */ 
+  size = ui; /* make sure it's a power of 2 */
 
   bf = (Bloomfilter *) MALLOC(sizeof(Bloomfilter));
 
@@ -392,27 +392,27 @@
   if (-1 == bf->fd) {
     LOG_FILE_STRERROR(LOG_FAILURE, "open", filename);
     FREE(bf);
-    return NULL;    
+    return NULL;
   }
 
   /* Alloc block */
   MUTEX_CREATE_RECURSIVE(&bf->lock);
-  bf->bitArray 
+  bf->bitArray
     = (char *) xmalloc_unchecked_(size, __FILE__, __LINE__);
   bf->bitArraySize = size;
   bf->addressesPerElement = k;
-  memset(bf->bitArray, 
-        0, 
+  memset(bf->bitArray,
+        0,
         bf->bitArraySize);
- 
+
   /* Read from the file what bits we can */
   rbuff = (char*)MALLOC(BUFFSIZE);
   pos = 0;
   while (pos < size*8) {
     int res;
-    
+
     res = READ(bf->fd,
-              rbuff, 
+              rbuff,
               BUFFSIZE);
     if (res == 0)
       break; /* is ok! we just did not use that many bits yet */
@@ -423,7 +423,7 @@
       if ( (rbuff[i] & 0xF0) != 0)
        setBit(bf->bitArray,
               pos + i*2 + 1);
-    }     
+    }
     if (res < BUFFSIZE)
       break;
     pos += BUFFSIZE * 2; /* 2 bits per byte in the buffer */
@@ -464,8 +464,8 @@
     return;
 
   MUTEX_LOCK(&bf->lock);
-  memset(bf->bitArray, 
-        0, 
+  memset(bf->bitArray,
+        0,
         bf->bitArraySize);
   makeEmptyFile(bf->fd,
                bf->bitArraySize * 4);
@@ -484,11 +484,11 @@
                    const HashCode512 * e) {
   int res;
 
-  if (NULL == bf) 
+  if (NULL == bf)
     return YES;
   MUTEX_LOCK(&bf->lock);
   res = YES;
-  iterateBits(bf, 
+  iterateBits(bf,
              (BitIterator)&testBitCallback,
              &res,
              e);
@@ -505,7 +505,7 @@
 void addToBloomfilter(Bloomfilter * bf,
                      const HashCode512 * e) {
 
-  if (NULL == bf) 
+  if (NULL == bf)
     return;
   MUTEX_LOCK(&bf->lock);
   iterateBits(bf,
@@ -523,7 +523,7 @@
  */
 void delFromBloomfilter(Bloomfilter * bf,
                        const HashCode512 * e) {
-  if(NULL == bf) 
+  if(NULL == bf)
     return;
   MUTEX_LOCK(&bf->lock);
   iterateBits(bf,
@@ -557,12 +557,12 @@
   i = 1;
   while (i < size)
     i*=2;
-  size = i; /* make sure it's a power of 2 */ 
+  size = i; /* make sure it's a power of 2 */
 
   bf->bitArraySize = size;
   bf->bitArray = (char*)MALLOC(size);
-  memset(bf->bitArray, 
-        0, 
+  memset(bf->bitArray,
+        0,
         bf->bitArraySize);
   makeEmptyFile(bf->fd,
                bf->bitArraySize * 4);

Modified: GNUnet/src/util/bloomtest.c
===================================================================
--- GNUnet/src/util/bloomtest.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/bloomtest.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -25,7 +25,7 @@
   int falseok;
 
   initUtil(argc, argv, NULL);
-  srand(1);  
+  srand(1);
   UNLINK("/tmp/bloomtest.dat");
   bf = loadBloomfilter("/tmp/bloomtest.dat", SIZE, K);
 
@@ -48,10 +48,10 @@
     return -1;
   }
   freeBloomfilter(bf);
- 
 
+
    bf=loadBloomfilter("/tmp/bloomtest.dat", SIZE, K);
-  
+
   srand(1);
   ok=0;
   for(i=0;i<200;i++) {
@@ -61,13 +61,13 @@
   }
   if (ok != 200) {
     printf(" Got %d elements out of 200"
-          "expected after reloading.\n", 
+          "expected after reloading.\n",
           ok);
     doneUtil();
     return -1;
   }
 
-  srand(1);  
+  srand(1);
   for(i=0;i<100;i++) {
     nextHC(&tmp);
     delFromBloomfilter(bf, &tmp);
@@ -81,27 +81,27 @@
     if(testBloomfilter(bf, &tmp) == YES)
       ok++;
   }
-  
+
   if (ok != 100) {
     printf(" Expected 100 elements in filter"
-          " after adding 200 and deleting 100, got %d\n", 
+          " after adding 200 and deleting 100, got %d\n",
           ok);
     doneUtil();
-    return -1; 
-  } 
+    return -1;
+  }
 
   srand(3);
- 
+
   falseok=0;
   for(i=0;i<1000;i++) {
     nextHC(&tmp);
     if(testBloomfilter(bf, &tmp) == YES)
       falseok++;
   }
- 
+
   freeBloomfilter(bf);
-  
-  UNLINK("/tmp/bloomtest.dat"); 
+
+  UNLINK("/tmp/bloomtest.dat");
   doneUtil();
   return(0);
 }

Modified: GNUnet/src/util/checksum.c
===================================================================
--- GNUnet/src/util/checksum.c  2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/checksum.c  2005-03-20 23:54:53 UTC (rev 464)
@@ -18,15 +18,15 @@
      Boston, MA 02111-1307, USA.
 
      For the actual CRC code:
-     Copyright abandoned; this code is in the public domain. 
-     Provided to GNUnet by address@hidden 
+     Copyright abandoned; this code is in the public domain.
+     Provided to GNUnet by address@hidden
 */
 
 /**
  * @file util/checksum.c
  * @brief implementation of CRC32 and various helper methods
  * @author Christian Grothoff
- */ 
+ */
 
 #include "platform.h"
 #include "gnunet_util.h"
@@ -41,7 +41,7 @@
  #error This compiler is not ANSI-compliant!
 #endif
 
-#define Z_NULL  0  
+#define Z_NULL  0
 
 
 #define POLYNOMIAL (uLong)0xedb88320
@@ -75,7 +75,7 @@
  * property of detecting all burst errors of length 32 bits or less.
  */
 static uLong crc32(uLong crc,
-                  const char *buf, 
+                  const char *buf,
                   size_t len) {
   if (crc_table[255] == 0)
     make_crc_table();
@@ -108,7 +108,7 @@
  */
 unsigned long long ntohll(unsigned long long n) {
 #if __BYTE_ORDER == __BIG_ENDIAN
-  return n; 
+  return n;
 #else
   return (((unsigned long long)ntohl(n)) << 32) + ntohl(n >> 32);
 #endif
@@ -120,7 +120,7 @@
  */
 unsigned long long htonll(unsigned long long n) {
 #if __BYTE_ORDER == __BIG_ENDIAN
-  return n; 
+  return n;
 #else
   return (((unsigned long long)htonl(n)) << 32) + htonl(n >> 32);
 #endif
@@ -145,7 +145,7 @@
   char * ret;
   char * itmp;
   iconv_t cd;
-  
+
   cd = iconv_open("UTF-8", charset);
   if (cd == (iconv_t) -1)
     return strdup(charset);
@@ -156,7 +156,7 @@
   if (iconv(cd,
            (char**) &input,
            &len,
-           &itmp, 
+           &itmp,
            &finSize) == (size_t)-1) {
     iconv_close(cd);
     free(tmp);

Modified: GNUnet/src/util/configtest.c
===================================================================
--- GNUnet/src/util/configtest.c        2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/configtest.c        2005-03-20 23:54:53 UTC (rev 464)
@@ -18,7 +18,7 @@
   c = getConfigurationString("test",
                             "b");
   if (0 != strcmp("b",
-                 c)) {             
+                 c)) {         
     printf("[test]-b not mapped to b");
     return 1;
   }
@@ -36,7 +36,7 @@
                                    "d")) {
     printf("[more]-c not re-mapped to d");
     return 1;
-  }  
+  }
   if (42 != getConfigurationInt("more",
                                "five")) {
     printf("[more]-five not mapped to 42");
@@ -69,9 +69,9 @@
 }
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   char c;
 
@@ -81,18 +81,18 @@
       { "config",  1, 0, 'c' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
-                     "c:", 
-                     long_options, 
+                     argv,
+                     "c:",
+                     long_options,
                      &option_index);
-    
-    if (c == -1) 
+
+    if (c == -1)
       break;  /* No more flags to process */
-    
+
     switch(c) {
-    case 'c': 
+    case 'c':
       FREENONNULL(setConfigurationString("FILES",
                                         "gnunet.conf",
                                         GNoptarg));
@@ -117,10 +117,10 @@
   failureCount += testConfig();
   doneUtil();
 
-  if (failureCount == 0) 
+  if (failureCount == 0)
     return 0;
   else {
     printf("\n\n%d TESTS FAILED!\n\n",failureCount);
     return -1;
-  } 
+  }
 }

Modified: GNUnet/src/util/configuration.c
===================================================================
--- GNUnet/src/util/configuration.c     2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/configuration.c     2005-03-20 23:54:53 UTC (rev 464)
@@ -21,8 +21,8 @@
  * @file util/configuration.c
  * @brief high-level configuration managment (with command-line overrides)
  * @author Christian Grothoff
- * @author Gerd Knorr <address@hidden> 
- * 
+ * @author Gerd Knorr <address@hidden>
+ *
  * Configuration file parsing, taken from xawtv (GPL).
  *
  * This file provides code to parse a configuration file and access
@@ -73,15 +73,15 @@
   return e;
 }
 
-static struct CFG_ENTRIES * cfg_find_section(struct CFG_SECTIONS *c, 
+static struct CFG_ENTRIES * cfg_find_section(struct CFG_SECTIONS *c,
                                             const char * name) {
   struct CFG_ENTRIES * e;
   int i;
-  
+
   for (i=0; i<c->sec_count; i++)
     if (0 == strcasecmp(c->sec_names[i], name))
       return c->sec_entries[i];
-  
+
   /* 404 not found => create a new one */
   if ((c->sec_count % ALLOC_SIZE) == (ALLOC_SIZE-1)) {
     i = c->sec_count+1;
@@ -96,15 +96,15 @@
   e = cfg_init_entries();
   c->sec_names[c->sec_count]   = STRDUP(name);
   c->sec_entries[c->sec_count] = e;
-  c->sec_count++;    
+  c->sec_count++;
   return e;
 }
 
-static void cfg_set_entry(struct CFG_ENTRIES * e, 
-                         const char * name, 
+static void cfg_set_entry(struct CFG_ENTRIES * e,
+                         const char * name,
                          const char * value) {
   int i;
-  
+
   for (i=0; i<e->ent_count; i++)
     if (0 == strcasecmp(e->ent_names[i],
                        name))
@@ -123,12 +123,12 @@
           i+ALLOC_SIZE);
     }
     i = e->ent_count;
-    e->ent_count++;    
+    e->ent_count++;
   } else {
     /* free old values, will be replaced! */
     FREENONNULL(e->ent_names[i]);
     FREENONNULL(e->ent_values[i]);
-  }      
+  }
   e->ent_names[i]  = STRDUP(name);
   e->ent_values[i] = STRDUP(value);
 }
@@ -140,16 +140,16 @@
   int nr;
   int i;
   int emptyline;
-  
+
   if (NULL == c)
     c = cfg_init_sections();
   if (NULL == (fp = FOPEN(filename,"r")))
     return -1;
-  
-  memset(line, 
-        0, 
+
+  memset(line,
+        0,
         256);
-  
+
   nr = 0;
   while (NULL != fgets(line,255,fp)) {
     nr++;
@@ -167,7 +167,7 @@
     if (line[0] == '\n' || line[0] == '#' || line[0] == '%' ||
        line[0] == '\r')
       continue;
-    for (i=strlen(line)-2 ; 
+    for (i=strlen(line)-2 ;
         (i>=0) && (line[i] == ' ' || line[i] == '\t' ) ;
         i--)
       line[i] = 0;
@@ -186,11 +186,11 @@
     } else if (2 == sscanf(line," %63[^= ] = %191[^\n]",tag,value)) {
       /* foo = bar */
       if (NULL == e) /* no section defined so far: put in "global" section 
(change by CG) */
-       e = cfg_find_section(c, "");  
+       e = cfg_find_section(c, "");
       i=0;
       if (value[0] == '"') {
        i=1;
-       while ( (value[i] != '\0') && 
+       while ( (value[i] != '\0') &&
                (value[i] != '"') )
          i++;
        if (value[i] == '"') {
@@ -202,7 +202,7 @@
 #ifdef MINGW
     {
       int i2;
-      
+
       /* Strip LF */
       i2 = strlen(value) - 1;
       if (i2 >= 0 && value[i2] == '\r')
@@ -210,7 +210,7 @@
     }
 #endif
       cfg_set_entry(e, tag, &value[i]);
-      
+
     } else {
       /* Huh ? */
       LOG(LOG_ERROR,
@@ -224,11 +224,11 @@
 
 /* ------------------------------------------------------------------------ */
 
-static char * cfg_get_str(const char * sec, 
+static char * cfg_get_str(const char * sec,
                          const char * ent) {
   struct CFG_ENTRIES * e = NULL;
   int i;
-  
+
   for (i = 0; i < c->sec_count; i++)
     if (0 == strcasecmp(c->sec_names[i],sec))
       e = c->sec_entries[i];
@@ -241,11 +241,11 @@
   return NULL;
 }
 
-static int cfg_get_signed_int(const char *sec, 
+static int cfg_get_signed_int(const char *sec,
                              const char *ent) {
   char *val;
 
-  val = cfg_get_str(sec, ent);    
+  val = cfg_get_str(sec, ent);
   if (NULL == val)
     return 0;
   return atoi(val);
@@ -256,13 +256,13 @@
   int j;
 
   if (c == NULL)
-    return;          
+    return;    
   for (i=0;i<c->sec_count;i++) {
     if (c->sec_entries[i] != NULL) {
       for (j=0;j<c->sec_entries[i]->ent_count;j++) {
        FREENONNULL(c->sec_entries[i]->ent_names[j]);
        FREENONNULL(c->sec_entries[i]->ent_values[j]);
-      }    
+      }
       FREENONNULL(c->sec_entries[i]->ent_names);
       FREENONNULL(c->sec_entries[i]->ent_values);
     }
@@ -312,7 +312,7 @@
 
 /**
  * The command line strings (rest)
- */ 
+ */
 static char ** values;
 static int valuesCount;
 
@@ -327,7 +327,7 @@
   int i;
   char * prefix;
   char * result;
-  
+
   i=0;
   while ( (orig[i] != '/') &&
       (orig[i] != '\\') &&
@@ -344,7 +344,7 @@
     orig[i] = DIR_SEPARATOR;
     return orig;
   }
-  result = MALLOC(strlen(prefix) + 
+  result = MALLOC(strlen(prefix) +
                  strlen(&orig[i+1]) + 2);
   strcpy(result, prefix);
 #ifndef MINGW
@@ -361,7 +361,7 @@
 /**
  * Obtain a filename from the given section and option.  If the
  * filename is not specified, die with the given error message (do not
- * die if errMsg == NULL). 
+ * die if errMsg == NULL).
  *
  * @param section from which section, may not be NULL
  * @param option which option, may not be NULL
@@ -375,10 +375,10 @@
 char * getFileName(const char * section,
                   const char * option,
                   const char * errMsg) {
-  char * fn;  
+  char * fn;
   char * fnExpand;
 
-  fn = getConfigurationString(section, 
+  fn = getConfigurationString(section,
                              option);
   if (fn == NULL) {
     if (errMsg == NULL)
@@ -388,7 +388,7 @@
              section,
              option);
   }
-  fnExpand = expandFileName(fn);   
+  fnExpand = expandFileName(fn);
   FREE(fn);
   return fnExpand;
 }
@@ -406,7 +406,7 @@
   char * expCfgName;
 
   cfgName = getConfigurationString("FILES",
-                                  "gnunet.conf");  
+                                  "gnunet.conf");
   if (cfgName == NULL) {
     if (testConfigurationString("GNUNETD",
                                "_MAGIC_",
@@ -456,9 +456,9 @@
       fclose(f);
     }
   }
-  if (0 == assertIsFile(expCfgName)) 
+  if (0 == assertIsFile(expCfgName))
     errexit(_("Cannot open configuration file '%s'\n"),
-           expCfgName); 
+           expCfgName);
   FREENONNULL(cfgName);
 
   FREENONNULL(setConfigurationString("FILES",
@@ -467,7 +467,7 @@
   MUTEX_LOCK(&configLock);
   FREENONNULL(configuration_filename);
   configuration_filename = expCfgName;
-  
+
   if (parseConfigInit == YES) {
     doneParseConfig();
     parseConfigInit = NO;
@@ -499,7 +499,7 @@
 
 void unregisterConfigurationUpdateCallback(NotifyConfigurationUpdateCallback 
cb) {
   int i;
-  
+
   MUTEX_LOCK(&configLock);
   for (i=0;i<cbCnt;i++)
     if (cbl[i] == cb)
@@ -579,7 +579,7 @@
       if (pos->stringValue != NULL)
        retval = STRDUP(pos->stringValue);
       else
-       retval = NULL; 
+       retval = NULL;
       MUTEX_UNLOCK(&configLock);
       if (retval != NULL)
        if (retval[0] == '$') {
@@ -594,11 +594,11 @@
   if (parseConfigInit == YES)
     retval = cfg_get_str(section, option);
   if (retval != NULL)
-    retval = STRDUP(retval);  
+    retval = STRDUP(retval);
   MUTEX_UNLOCK(&configLock);
   if (retval != NULL)
-    if (retval[0] == '$') 
-      retval = expandDollar(section, retval);    
+    if (retval[0] == '$')
+      retval = expandDollar(section, retval);
   return retval;
 }
 
@@ -665,7 +665,7 @@
     pos = pos->next;
   }
   retval = 0;
-  if (parseConfigInit == YES) 
+  if (parseConfigInit == YES)
     retval = cfg_get_signed_int(section, option);
   MUTEX_UNLOCK(&configLock);
   return retval;
@@ -683,7 +683,7 @@
                              const char * option,
                              const char * value) {
   UserConf * pos;
-  UserConf * prev; 
+  UserConf * prev;
   char * res;
 
   GNUNET_ASSERT( (section != NULL) && (option != NULL) );
@@ -715,7 +715,7 @@
   pos->option = STRDUP(option);
   if (value != NULL)
     pos->stringValue = STRDUP(value);
-  else 
+  else
     pos->stringValue = NULL;
   pos->intValue = 0;
   pos->next = NULL;
@@ -726,7 +726,7 @@
       res = STRDUP(res);
   }
   MUTEX_UNLOCK(&configLock);
-  return res;    
+  return res;
 }
 
 /**
@@ -740,7 +740,7 @@
                                 const char * option,
                                 const unsigned int value) {
   UserConf * pos;
-  UserConf * prev; 
+  UserConf * prev;
   unsigned int res;
 
   GNUNET_ASSERT( (section != NULL) && (option != NULL) );
@@ -774,7 +774,7 @@
   if (parseConfigInit == YES)
     res = cfg_get_signed_int(section, option);
   MUTEX_UNLOCK(&configLock);
-  return res; 
+  return res;
 }
 
 /**
@@ -799,7 +799,7 @@
  * Set the list of command line options (remainder after getopt style
  * parsing).
  *
- * @param value the values 
+ * @param value the values
  + @param count the number of values
  */
 void setConfigurationStringList(char ** value,

Modified: GNUnet/src/util/crctest.c
===================================================================
--- GNUnet/src/util/crctest.c   2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/crctest.c   2005-03-20 23:54:53 UTC (rev 464)
@@ -1,4 +1,4 @@
-/** 
+/**
  * @file util/crctest.c
  * @brief testcase for util/checksum.c
  */
@@ -15,7 +15,7 @@
 
   for (i=0;i<1024;i++)
     buf[i] = (char)i;
-  for (i=0;i<1024;i++) 
+  for (i=0;i<1024;i++)
     if (expected[i] != crc32N(&buf[i], 1024-i))
       return 1;
   return 0;

Modified: GNUnet/src/util/cron.c
===================================================================
--- GNUnet/src/util/cron.c      2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/cron.c      2005-03-20 23:54:53 UTC (rev 464)
@@ -47,7 +47,7 @@
 #endif
 
 /**
- * The initial size of the cron-job table 
+ * The initial size of the cron-job table
  */
 #define INIT_CRON_JOBS 16
 
@@ -56,7 +56,7 @@
  * signal-interrupted sleep does not work nicely, so to ensure
  * progress, we should rather wake up periodically. (But we don't want
  * to burn too much CPU time doing busy waiting; every 2s strikes a
- * good balance) 
+ * good balance)
  */
 #define MAXSLEEP 2000
 
@@ -90,7 +90,7 @@
  */
 static unsigned int deltaListSize_;
 
-/** 
+/**
  * The lock for the delta-list.
  */
 static Mutex deltaListLock_;
@@ -161,7 +161,7 @@
 #endif
 
   deltaListSize_ = INIT_CRON_JOBS;
-  deltaList_ 
+  deltaList_
     = MALLOC(sizeof(DeltaEntry) * deltaListSize_);
   for (i=0;i<deltaListSize_;i++)
     deltaList_[i].next = i-1;
@@ -172,7 +172,7 @@
   firstUsed_  = -1;
   /* SA_NODEFER == SA_NOMASK but is available on linux */
 
-#ifndef WINDOWS /* We don't use signals under Windows */ 
+#ifndef WINDOWS /* We don't use signals under Windows */
   memset(&sig, 0, sizeof(struct sigaction));
   memset(&old, 0, sizeof(struct sigaction));
   sig.sa_flags = SA_NODEFER;
@@ -208,10 +208,10 @@
   cron_shutdown = NO;
   cron_signal = SEMAPHORE_NEW(0);
   if (0 != PTHREAD_CREATE(&cron_handle,
-                         (PThreadMain) cron, 
+                         (PThreadMain) cron,
                          NULL,
                          256 * 1024))
-    DIE_STRERROR("pthread_create"); 
+    DIE_STRERROR("pthread_create");
   /* large stack, we don't know for sure
      what the cron jobs may be doing */
 }
@@ -257,7 +257,7 @@
     MUTEX_UNLOCK(&inBlockLock_);
   }
 }
-                                  
+                               
 /**
  * Stop running cron-jobs for a short time.  This method may only be
  * called by a thread that is not holding any locks (otherwise
@@ -273,8 +273,8 @@
   if (inBlock == 1) {
     blockSignal = SEMAPHORE_NEW(0);
     addCronJob((CronJob)&block,
-              0, 
               0,
+              0,
               blockSignal);
     SEMAPHORE_DOWN(blockSignal);
     SEMAPHORE_FREE(blockSignal);
@@ -309,20 +309,20 @@
 
 static void abortSleep() {
 #if DEBUG_CRON
-  LOG(LOG_CRON, 
+  LOG(LOG_CRON,
       "Sending signal to pid %d\n",
       cronPID);
 #endif
   if (! isCronRunning())
     return;
 #ifdef WINDOWS
-  QueueUserAPC((PAPCFUNC) sigalrmHandler, 
+  QueueUserAPC((PAPCFUNC) sigalrmHandler,
               IsWinNT() ? 0 : GetCurrentThread(), 0);
-#elif SOMEBSD || OSX || SOLARIS 
+#elif SOMEBSD || OSX || SOLARIS
   PTHREAD_KILL(&cron_handle, SIGALRM);
 #else
   /* linux */
-  if (cronPID != 0) 
+  if (cronPID != 0)
     kill(cronPID, SIGALRM);
 #endif
 }
@@ -360,7 +360,7 @@
     /* not in queue; add if not running */
     if ( (method != runningJob_) ||
          (data != runningData_) ||
-        (deltaRepeat != runningRepeat_) ) { 
+        (deltaRepeat != runningRepeat_) ) {
       BREAK();
       LOG(LOG_WARNING,
          _("'%s' called with cron job not in queue, adding.  This may not be 
what you want.\n"),
@@ -370,12 +370,12 @@
                 deltaRepeat,
                 data);
     }
-    MUTEX_UNLOCK(&deltaListLock_); 
-    return; 
+    MUTEX_UNLOCK(&deltaListLock_);
+    return;
   }
   last = NULL;
   job = &deltaList_[jobId];
-  while ( (job->method != method) || 
+  while ( (job->method != method) ||
          (job->data != data) ||
          (job->deltaRepeat != deltaRepeat) ) {
     last = job;
@@ -389,21 +389,21 @@
                   deltaRepeat,
                   data);
       }
-      MUTEX_UNLOCK(&deltaListLock_); 
-      return; 
+      MUTEX_UNLOCK(&deltaListLock_);
+      return;
     }
     jobId = job->next;
-    job = &deltaList_[jobId];    
+    job = &deltaList_[jobId];
   }
   /* ok, found it; remove, re-add with time 0 */
   delCronJob(method,
-            deltaRepeat, 
+            deltaRepeat,
             data);
   addCronJob(method,
             0,
             deltaRepeat,
             data);
-  MUTEX_UNLOCK(&deltaListLock_); 
+  MUTEX_UNLOCK(&deltaListLock_);
 }
 
 /**
@@ -427,9 +427,9 @@
   int current;
 
 #if DEBUG_CRON
-  LOG(LOG_CRON, 
+  LOG(LOG_CRON,
       "Adding job %p-%p to fire in %d CU\n",
-      method, 
+      method,
       data,
       delta);
 #endif
@@ -452,12 +452,12 @@
   entry->deltaRepeat = deltaRepeat;
   entry->delta = cronTime(NULL) + delta;
   if (firstUsed_ == -1) {
-    firstUsed_ 
+    firstUsed_
       = firstFree_;
     firstFree_
       = entry->next;
     entry->next = -1; /* end of list */
-    MUTEX_UNLOCK(&deltaListLock_);  
+    MUTEX_UNLOCK(&deltaListLock_);
     /* interrupt sleeping cron-thread! */
     abortSleep();
     return;
@@ -477,20 +477,20 @@
       firstFree_
        = entry->next;
       entry->next = -1;
-      MUTEX_UNLOCK(&deltaListLock_); 
+      MUTEX_UNLOCK(&deltaListLock_);
       return;
-    }      
+    }
   }
   /* insert before pos */
   if (last == -1) {
     firstUsed_ = firstFree_;
     abortSleep();
-  } else 
-    deltaList_[last].next = firstFree_;  
+  } else
+    deltaList_[last].next = firstFree_;
   firstFree_
     = entry->next;
   entry->next = current;
-  MUTEX_UNLOCK(&deltaListLock_); 
+  MUTEX_UNLOCK(&deltaListLock_);
 }
 
 #if HAVE_PRINT_CRON_TAB
@@ -508,11 +508,11 @@
   jobId = firstUsed_;
   while (jobId != -1) {
     tab = &deltaList_[jobId];
-    LOG(LOG_CRON, 
+    LOG(LOG_CRON,
        "%3u: delta %8lld CU --- method %p --- repeat %8u CU\n",
-       jobId, 
+       jobId,
        tab->delta - now,
-       (int)tab->method, 
+       (int)tab->method,
        tab->deltaRepeat);
     jobId = tab->next;
   }
@@ -536,8 +536,8 @@
   unsigned int repeat;
 
   jobId = firstUsed_;
-  if (jobId == -1) 
-    return; /* no job to be done */  
+  if (jobId == -1)
+    return; /* no job to be done */
   job    = &deltaList_[jobId];
   method = job->method;
   runningJob_ = method;
@@ -551,21 +551,21 @@
   job->next
     = firstFree_;
   firstFree_ = jobId;
-  MUTEX_UNLOCK(&deltaListLock_); 
-  /* re-insert */  
+  MUTEX_UNLOCK(&deltaListLock_);
+  /* re-insert */
   if (repeat > 0) {
 #if DEBUG_CRON
-    LOG(LOG_CRON, 
+    LOG(LOG_CRON,
        "adding periodic job %p-%p to run again in %u\n",
        method,
        data,
        repeat);
-#endif   
+#endif
     addCronJob(method, repeat, repeat, data);
   }
   /* run */
 #if DEBUG_CRON
-  LOG(LOG_CRON, 
+  LOG(LOG_CRON,
       "running job %p-%p\n",
       method,
       data);
@@ -574,7 +574,7 @@
   MUTEX_LOCK(&deltaListLock_);
   runningJob_ = NULL;
 #if DEBUG_CRON
-  LOG(LOG_CRON, 
+  LOG(LOG_CRON,
       "job %p-%p done\n",
       method,
       data);
@@ -590,7 +590,7 @@
 
   cronPID = getpid();
   while (cron_shutdown == NO) {
-#if HAVE_PRINT_CRON_TAB 
+#if HAVE_PRINT_CRON_TAB
     printCronTab();
 #endif
     cronTime(&now);
@@ -600,24 +600,24 @@
       cronTime(&now);
       next = deltaList_[firstUsed_].delta;
       if (next <= now) {
-#if DEBUG_CRON 
+#if DEBUG_CRON
        LOG(LOG_CRON,
            "running cron job, table is\n");
        printCronTab();
 #endif
        runJob();
-#if DEBUG_CRON 
+#if DEBUG_CRON
        LOG(LOG_CRON,
            "job run, new table is\n");
        printCronTab();
 #endif
-      } else 
-       break;      
+      } else
+       break;
     }
     MUTEX_UNLOCK(&deltaListLock_);
     next = next - now; /* how long to sleep */
 #if DEBUG_CRON
-    LOG(LOG_CRON, 
+    LOG(LOG_CRON,
        "Sleeping at %llu for %llu CU (%llu s, %llu CU)\n",
        now,
        next,
@@ -628,10 +628,10 @@
       next = MAXSLEEP;
     gnunet_util_sleep(next);
 #if DEBUG_CRON
-    LOG(LOG_CRON, 
-       "woke up at  %llu - %lld CS late\n", 
+    LOG(LOG_CRON,
+       "woke up at  %llu - %lld CS late\n",
        cronTime(NULL),
-       cronTime(NULL)-(now+next)); 
+       cronTime(NULL)-(now+next));
 #endif
   }
   SEMAPHORE_UP(cron_signal);
@@ -647,7 +647,7 @@
  * running job and may return before the running job has terminated).
  *
  * @param method which method is listed?
- * @param repeat which repeat factor was chosen? 
+ * @param repeat which repeat factor was chosen?
  * @param data what was the data given to the method
  * @return the number of jobs removed
  */
@@ -667,23 +667,23 @@
   MUTEX_LOCK(&deltaListLock_);
   jobId = firstUsed_;
   if (jobId == -1) {
-    MUTEX_UNLOCK(&deltaListLock_); 
-    return 0; 
+    MUTEX_UNLOCK(&deltaListLock_);
+    return 0;
   }
   last = NULL;
   job = &deltaList_[jobId];
-  while ( (job->method != method) || 
+  while ( (job->method != method) ||
          (job->data != data) ||
          (job->deltaRepeat != repeat) ) {
     last = job;
     if (job->next == -1) {
-      MUTEX_UNLOCK(&deltaListLock_); 
-      return 0;  
+      MUTEX_UNLOCK(&deltaListLock_);
+      return 0;
     }
     jobId = job->next;
-    job = &deltaList_[jobId];    
+    job = &deltaList_[jobId];
   }
-  if (last != NULL) 
+  if (last != NULL)
     last->next = job->next;
   else
     firstUsed_ = job->next;

Modified: GNUnet/src/util/crontest.c
===================================================================
--- GNUnet/src/util/crontest.c  2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/crontest.c  2005-03-20 23:54:53 UTC (rev 464)
@@ -50,7 +50,7 @@
   addCronJob(&cronJob3, cronSECONDS*16, cronSECONDS*16, NULL);
   for (i=0;i<10;i++) {
     /*    fprintf(stderr,"."); */
-    sleep(1);   
+    sleep(1);
     if (((global-i) * (global-i)) > 9) {
       fprintf(stderr,"1: Expected %d got %d\n", i, global);
       return 1;
@@ -83,20 +83,20 @@
     fprintf(stderr,
            "cron job was supposed to be deleted, but ran anyway!\n");
     return 1;
-  } else 
+  } else
     return 0;
 }
- 
+
 int main(int argc, char * argv[]) {
   int failureCount = 0;
 
   initCron();
   startCron();
-  failureCount += testCron(); 
+  failureCount += testCron();
   failureCount += testDelCron();
   stopCron();
   doneCron();
-  if (failureCount == 0) 
+  if (failureCount == 0)
     return 0;
   else {
     printf("\n\n%d TESTS FAILED!\n\n",failureCount);

Modified: GNUnet/src/util/dso.c
===================================================================
--- GNUnet/src/util/dso.c       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/dso.c       2005-03-20 23:54:53 UTC (rev 464)
@@ -82,12 +82,12 @@
   void * libhandle;
   char * libname;
 
-  if (0 != lt_dlinit()) 
+  if (0 != lt_dlinit())
     DIE_STRERROR("lt_dlinit");
   /* finally, load the library */
   libname = buildLibName(libprefix,
                         dsoname);
-  libhandle = lt_dlopenext(libname); 
+  libhandle = lt_dlopenext(libname);
   if (libhandle == NULL) {
     LOG(LOG_ERROR,
        _("'%s' failed for library '%s' at %s:%d with error: %s\n"),
@@ -100,12 +100,12 @@
   return libhandle;
 }
 
-void unloadDynamicLibrary(void * libhandle) {  
+void unloadDynamicLibrary(void * libhandle) {
   /* when valgrinding, comment out these lines
      to get decent traces for memory leaks on exit */
   lt_dlclose(libhandle);
   if (0 != lt_dlexit())
-    LOG_STRERROR(LOG_WARNING, "lt_dlexit");  
+    LOG_STRERROR(LOG_WARNING, "lt_dlexit");
 }
 
 void * trybindDynamicMethod(void * libhandle,
@@ -142,7 +142,7 @@
     LOG(LOG_ERROR,
        _("'%s' failed to resolve method '%s%s' at %s:%d with error: %s\n"),
        "lt_dlsym",
-       methodprefix, dsoname, 
+       methodprefix, dsoname,
        __FILE__, __LINE__,
        lt_dlerror());
   return mptr;

Modified: GNUnet/src/util/getopt.c
===================================================================
--- GNUnet/src/util/getopt.c    2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/getopt.c    2005-03-20 23:54:53 UTC (rev 464)
@@ -27,7 +27,7 @@
 /**
  * @file util/getopt.c
  * @brief GNU style option parsing
- */ 
+ */
 
 #include "gnunet_util.h"
 #include "platform.h"

Modified: GNUnet/src/util/hashing.c
===================================================================
--- GNUnet/src/util/hashing.c   2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/hashing.c   2005-03-20 23:54:53 UTC (rev 464)
@@ -18,7 +18,7 @@
      Boston, MA 02111-1307, USA.
 
      SHA-512 code by Jean-Luc Cooke <address@hidden>
-  
+
      Copyright (c) Jean-Luc Cooke <address@hidden>
      Copyright (c) Andrew McDonald <address@hidden>
      Copyright (c) 2003 Kyle McMartin <address@hidden>
@@ -42,19 +42,19 @@
   unsigned char buf[128];
 };
 
-static unsigned long long Ch(unsigned long long x, 
-                            unsigned long long y, 
+static unsigned long long Ch(unsigned long long x,
+                            unsigned long long y,
                             unsigned long long z) {
   return z ^ (x & (y ^ z));
 }
 
-static unsigned long long Maj(unsigned long long x, 
-                             unsigned long long y, 
+static unsigned long long Maj(unsigned long long x,
+                             unsigned long long y,
                              unsigned long long z) {
   return (x & y) | (z & (x | y));
 }
 
-static unsigned long long RORu64(unsigned long long x, 
+static unsigned long long RORu64(unsigned long long x,
                                 unsigned long long y) {
   return (x >> y) | (x << (64 - y));
 }
@@ -141,21 +141,21 @@
 sha512_transform(unsigned long long *state, const unsigned char *input) {
   unsigned long long a, b, c, d, e, f, g, h, t1, t2;
   unsigned long long W[80];
-  
+
   int i;
-  
+
   /* load the input */
   for (i = 0; i < 16; i++)
     LOAD_OP(i, W, input);
-  
+
   for (i = 16; i < 80; i++) {
     BLEND_OP(i, W);
   }
-  
+
   /* load the state into our registers */
-  a=state[0];   b=state[1];   c=state[2];   d=state[3];  
-  e=state[4];   f=state[5];   g=state[6];   h=state[7];  
-  
+  a=state[0];   b=state[1];   c=state[2];   d=state[3];
+  e=state[4];   f=state[5];   g=state[6];   h=state[7];
+
   /* now iterate */
   for (i=0; i<80; i+=8) {
     t1 = h + e1(e) + Ch(e,f,g) + sha512_K[i  ] + W[i  ];
@@ -175,10 +175,10 @@
     t1 = a + e1(f) + Ch(f,g,h) + sha512_K[i+7] + W[i+7];
     t2 = e0(b) + Maj(b,c,d);    e+=t1;    a=t1+t2;
   }
-  
-  state[0] += a; state[1] += b; state[2] += c; state[3] += d;  
-  state[4] += e; state[5] += f; state[6] += g; state[7] += h;  
-  
+
+  state[0] += a; state[1] += b; state[2] += c; state[3] += d;
+  state[4] += e; state[5] += f; state[6] += g; state[7] += h;
+
   /* erase our data */
   a = b = c = d = e = f = g = h = t1 = t2 = 0;
   memset(W, 0, 80 * sizeof(unsigned long long));
@@ -200,13 +200,13 @@
 
 static void
 sha512_update(struct sha512_ctx * sctx,
-             const unsigned char *data, 
+             const unsigned char *data,
              unsigned int len) {
   unsigned int i, index, part_len;
-  
+
   /* Compute number of bytes mod 128 */
   index = (unsigned int)((sctx->count[0] >> 3) & 0x7F);
-  
+
   /* Update number of bits */
   if ((sctx->count[0] += (len << 3)) < (len << 3)) {
     if ((sctx->count[1] += 1) < 1)
@@ -214,70 +214,70 @@
        sctx->count[3]++;
     sctx->count[1] += (len >> 29);
   }
-  
+
   part_len = 128 - index;
-  
+
   /* Transform as many times as possible. */
   if (len >= part_len) {
     memcpy(&sctx->buf[index], data, part_len);
     sha512_transform(sctx->state, sctx->buf);
-    
+
     for (i = part_len; i + 127 < len; i+=128)
       sha512_transform(sctx->state, &data[i]);
-    
+
     index = 0;
   } else {
     i = 0;
   }
-  
+
   /* Buffer remaining input */
   memcpy(&sctx->buf[index], &data[i], len - i);
 }
 
 static void
-sha512_final(struct sha512_ctx * sctx, 
-            unsigned char *hash) {  
+sha512_final(struct sha512_ctx * sctx,
+            unsigned char *hash) {
   static unsigned char padding[128] = { 0x80, };
-  
+
   unsigned int t;
   unsigned long long t2;
   unsigned char bits[128];
   unsigned int index, pad_len;
   int i, j;
-  
+
   index = pad_len = t = i = j = 0;
   t2 = 0;
-  
+
   /* Save number of bits */
   t = sctx->count[0];
   bits[15] = t; t>>=8;
   bits[14] = t; t>>=8;
   bits[13] = t; t>>=8;
-  bits[12] = t; 
+  bits[12] = t;
   t = sctx->count[1];
   bits[11] = t; t>>=8;
   bits[10] = t; t>>=8;
   bits[9 ] = t; t>>=8;
-  bits[8 ] = t; 
+  bits[8 ] = t;
   t = sctx->count[2];
   bits[7 ] = t; t>>=8;
   bits[6 ] = t; t>>=8;
   bits[5 ] = t; t>>=8;
-  bits[4 ] = t; 
+  bits[4 ] = t;
   t = sctx->count[3];
   bits[3 ] = t; t>>=8;
   bits[2 ] = t; t>>=8;
   bits[1 ] = t; t>>=8;
-  bits[0 ] = t; 
-  
+  bits[0 ] = t;
+
   /* Pad out to 112 mod 128. */
   index = (sctx->count[0] >> 3) & 0x7f;
   pad_len = (index < 112) ? (112 - index) : ((128+112) - index);
   sha512_update(sctx, padding, pad_len);
-  
+
   /* Append length (before padding) */
   sha512_update(sctx, bits, 16);
-  
+
   /* Store state in digest */
   for (i = j = 0; i < 8; i++, j += 8) {
     t2 = sctx->state[i];
@@ -290,7 +290,7 @@
     hash[j+1] = (char)t2 & 0xff; t2>>=8;
     hash[j  ] = (char)t2 & 0xff;
   }
-  
+
   /* Zeroize sensitive information. */
   memset(sctx, 0, sizeof(struct sha512_ctx));
 }
@@ -328,15 +328,15 @@
   int fh;
   struct sha512_ctx ctx;
 
-  fh = OPEN(filename, 
+  fh = OPEN(filename,
 #ifdef O_LARGEFILE
            O_RDONLY | O_LARGEFILE
 #else
            O_RDONLY
 #endif
            );
-  if (fh == -1) 
-    return SYSERR;  
+  if (fh == -1)
+    return SYSERR;
   sha512_init(&ctx);
   pos = 0;
   buf = MALLOC(65536);
@@ -375,7 +375,7 @@
 static unsigned char * encTable__ = "0123456789ABCDEFGHIJKLMNOPQRSTUV";
 
 static unsigned int getValue__(unsigned char a) {
-  if ( (a >= '0') && (a <= '9') ) 
+  if ( (a >= '0') && (a <= '9') )
     return a - '0';
   if ( (a >= 'A') && (a <= 'V') )
     return (a - 'A' + 10);
@@ -429,7 +429,7 @@
  * Convert ASCII encoding back to hash
  *
  * @param enc the encoding
- * @param result where to store the hash code 
+ * @param result where to store the hash code
  * @return OK on success, SYSERR if result has the wrong encoding
  */
 int enc2hash(const char * enc,
@@ -451,7 +451,7 @@
     bits = (getValue__(enc[--rpos]) << vbit) | bits;
     vbit += 5;
     if (vbit >= 8) {
-      ((unsigned char*)result)[--wpos] 
+      ((unsigned char*)result)[--wpos]
        = (unsigned char) bits;
       bits = bits >> 8;
       vbit -= 8;
@@ -468,10 +468,10 @@
  * somewhat consistent. And of course, the result should be a positive
  * number.
  *
- * @returns a positive number which is a measure for 
+ * @returns a positive number which is a measure for
  *  hashcode proximity.
  */
-int distanceHashCode512(const HashCode512 * a, 
+int distanceHashCode512(const HashCode512 * a,
                        const HashCode512 * b) {
   int x = (a->bits[1] - b->bits[1])>>16;
   return ((x*x)>>16);
@@ -481,14 +481,14 @@
  * Compare two hashcodes.
  * @return 1 if they are equal, 0 if not.
  */
-int equalsHashCode512(const HashCode512 * a, 
+int equalsHashCode512(const HashCode512 * a,
                      const HashCode512 * b) {
   return (0 == memcmp(a,b,sizeof(HashCode512)));
 }
 
 void makeRandomId(HashCode512 * result) {
   int i;
-  for (i=(sizeof(HashCode512)/sizeof(unsigned int))-1;i>=0;i--) 
+  for (i=(sizeof(HashCode512)/sizeof(unsigned int))-1;i>=0;i--)
     result->bits[i] = rand();
 }
 
@@ -496,7 +496,7 @@
             const HashCode512 * b,
             HashCode512 * result) {
   int i;
-  for (i=(sizeof(HashCode512)/sizeof(unsigned int))-1;i>=0;i--) 
+  for (i=(sizeof(HashCode512)/sizeof(unsigned int))-1;i>=0;i--)
     result->bits[i] = b->bits[i] - a->bits[i];
 }
 
@@ -504,7 +504,7 @@
                  const HashCode512 * delta,
                  HashCode512 * result) {
   int i;
-  for (i=(sizeof(HashCode512)/sizeof(unsigned int))-1;i>=0;i--) 
+  for (i=(sizeof(HashCode512)/sizeof(unsigned int))-1;i>=0;i--)
     result->bits[i] = delta->bits[i] + a->bits[i];
 }
 
@@ -512,7 +512,7 @@
                  const HashCode512 * b,
                  HashCode512 * result) {
   int i;
-  for (i=(sizeof(HashCode512)/sizeof(unsigned int))-1;i>=0;i--) 
+  for (i=(sizeof(HashCode512)/sizeof(unsigned int))-1;i>=0;i--)
     result->bits[i] = a->bits[i] ^ a->bits[i];
 }
 
@@ -520,9 +520,9 @@
  * Check if two hosts are the same.
  * @return YES if they are equal, otherwise NO
  */
-int hostIdentityEquals(const PeerIdentity * first, 
+int hostIdentityEquals(const PeerIdentity * first,
                       const PeerIdentity * second) {
-  if ( (first == NULL) || 
+  if ( (first == NULL) ||
        (second == NULL) )
     return NO;
   return equalsHashCode512(&first->hashPubKey,
@@ -541,7 +541,7 @@
   memcpy(skey,
         hc,
         SESSIONKEY_LEN);
-  skey->crc32 = htonl(crc32N(skey, 
+  skey->crc32 = htonl(crc32N(skey,
                             SESSIONKEY_LEN));
   memcpy(iv,
         &((char *)hc)[SESSIONKEY_LEN],
@@ -575,7 +575,7 @@
   /* FIXME: we can do this much more efficiently... */
   for (i = sizeof(HashCode512)*8 - 1; i >= 0; --i) {
     diff = getHashCodeBit(h2, i) - getHashCodeBit(h1, i);
-    if (diff < 0) 
+    if (diff < 0)
       return -1;
     else if (diff > 0)
       return 1;
@@ -615,7 +615,7 @@
     bt = getHashCodeBit(target, i);
     /* Check XOR distance. */
     diff = (b2 ^ bt) - (b1 ^ bt);
-    if (diff < 0) 
+    if (diff < 0)
       return -1;
     else if (diff > 0)
       return 1;

Modified: GNUnet/src/util/hashingtest.c
===================================================================
--- GNUnet/src/util/hashingtest.c       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/hashingtest.c       2005-03-20 23:54:53 UTC (rev 464)
@@ -19,7 +19,7 @@
     printf("enc2hash failed!\n");
     return 1;
   }
-    
+
   if (! equalsHashCode512(&h1, &h2)) {
     return 1;
   }
@@ -42,8 +42,8 @@
   doneLockingGcrypt();
   if (failureCount == 0)
     return 0;
-  else 
+  else
     return 1;
-} 
+}
 
 /* end of hashingtest.c */

Modified: GNUnet/src/util/hashtest.c
===================================================================
--- GNUnet/src/util/hashtest.c  2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/hashtest.c  2005-03-20 23:54:53 UTC (rev 464)
@@ -1,4 +1,4 @@
-/** 
+/**
  * @file test/hashtest.c
  * @brief testcase for util/hashing.c
  */
@@ -7,9 +7,9 @@
 #include "platform.h"
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   return OK;
 }
@@ -25,7 +25,7 @@
        (hc.bits[3] != ntohl(-234043098)) ||
        (hc.bits[4] != ntohl(-182141268)) ) {
     printf("Hash of TEST wrong (%d, %d, %d, %d, %d).\n",
-          ntohl(hc.bits[0]), 
+          ntohl(hc.bits[0]),
           ntohl(hc.bits[1]),
           ntohl(hc.bits[2]),
           ntohl(hc.bits[3]),
@@ -39,7 +39,7 @@
        (hc.bits[3] != ntohl(-697466873)) ||
        (hc.bits[4] != ntohl(-702487547)) ) {
     printf("Hash of nothing (0-size) wrong  (%d, %d, %d, %d, %d).\n",
-          ntohl(hc.bits[0]), 
+          ntohl(hc.bits[0]),
           ntohl(hc.bits[1]),
           ntohl(hc.bits[2]),
           ntohl(hc.bits[3]),

Modified: GNUnet/src/util/hostkey_gcrypt.c
===================================================================
--- GNUnet/src/util/hostkey_gcrypt.c    2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/hostkey_gcrypt.c    2005-03-20 23:54:53 UTC (rev 464)
@@ -75,9 +75,9 @@
   if (size < target) {
     memmove(&buf[target-size],
            buf,
-           size);    
-    memset(buf, 
-          0, 
+           size);
+    memset(buf,
+          0,
           target-size);
   }
 }
@@ -92,8 +92,8 @@
   int rc;
 
   lockGcrypt();
-  rc = gcry_sexp_build(&s_keyparam, 
-                      NULL, 
+  rc = gcry_sexp_build(&s_keyparam,
+                      NULL,
                       "(genkey(rsa(nbits %d)(rsa-use-e 3:257)))",
                       HOSTKEY_LEN);
   if (rc) {
@@ -134,13 +134,13 @@
 }
 
 static int key_from_sexp( gcry_mpi_t *array,
-                         gcry_sexp_t sexp, 
-                         const char *topname, 
+                         gcry_sexp_t sexp,
+                         const char *topname,
                          const char *elems ) {
   gcry_sexp_t list, l2;
   const char *s;
   int i, idx;
-  
+
   lockGcrypt();
   list = gcry_sexp_find_token( sexp, topname, 0 );
   if( !list ) {
@@ -154,7 +154,7 @@
     unlockGcrypt();
     return 2;
   }
-  
+
   idx = 0;
   for(s=elems; *s; s++, idx++ ) {
     l2 = gcry_sexp_find_token( list, s, 1 );
@@ -179,7 +179,7 @@
       return 4; /* required parameter is invalid */
     }
   }
-  gcry_sexp_release ( list );  
+  gcry_sexp_release ( list );
   unlockGcrypt();
   return 0;
 }
@@ -194,46 +194,46 @@
   gcry_mpi_t skey[2];
   int size;
   int rc;
-  
+
   lockGcrypt();
-  rc = key_from_sexp(skey, 
-                    hostkey->sexp, 
-                    "public-key", 
+  rc = key_from_sexp(skey,
+                    hostkey->sexp,
+                    "public-key",
                     "ne");
   if (rc)
-    rc = key_from_sexp(skey, 
-                      hostkey->sexp, 
-                      "private-key", 
-                      "ne");    
+    rc = key_from_sexp(skey,
+                      hostkey->sexp,
+                      "private-key",
+                      "ne");
   if (rc)
-    rc = key_from_sexp(skey, 
-                      hostkey->sexp, 
-                      "rsa", 
-                      "ne");    
-  if (rc) 
+    rc = key_from_sexp(skey,
+                      hostkey->sexp,
+                      "rsa",
+                      "ne");
+  if (rc)
     DIE_GCRY("key_from_sexp", rc);
-  
+
   result->len = htons(sizeof(PublicKey) - sizeof(result->padding));
   result->sizen = htons(RSA_ENC_LEN);
   result->padding = 0;
   size = RSA_ENC_LEN;
-  rc = gcry_mpi_print(GCRYMPI_FMT_USG, 
-                     &result->key[0], 
+  rc = gcry_mpi_print(GCRYMPI_FMT_USG,
+                     &result->key[0],
                      size,
-                     &size, 
+                     &size,
                      skey[0]);
-  if (rc) 
+  if (rc)
     DIE_GCRY("gcry_mpi_print", rc);
   adjust(&result->key[0], size, RSA_ENC_LEN);
-  size = RSA_KEY_LEN - RSA_ENC_LEN; 
-  rc = gcry_mpi_print(GCRYMPI_FMT_USG, 
-                     &result->key[RSA_ENC_LEN], 
+  size = RSA_KEY_LEN - RSA_ENC_LEN;
+  rc = gcry_mpi_print(GCRYMPI_FMT_USG,
+                     &result->key[RSA_ENC_LEN],
                      size,
-                     &size, 
+                     &size,
                      skey[1]);
-  if (rc) 
+  if (rc)
     DIE_GCRY("gcry_mpi_print", rc);
-  adjust(&result->key[RSA_ENC_LEN], 
+  adjust(&result->key[RSA_ENC_LEN],
         size,
         RSA_KEY_LEN - RSA_ENC_LEN);
   gcry_mpi_release(skey[0]);
@@ -286,7 +286,7 @@
     unlockGcrypt();
     return NULL;
   }
-  rc = gcry_sexp_build(&result, 
+  rc = gcry_sexp_build(&result,
                       &erroff,
                       "(public-key(rsa(n %m)(e %m)))",
                       n,
@@ -297,7 +297,7 @@
     LOG_GCRY(LOG_ERROR, "gcry_sexp_build", rc); /* erroff gives more info */
     unlockGcrypt();
     return NULL;
-  }  
+  }
   unlockGcrypt();
   ret = MALLOC(sizeof(struct PrivateKey));
   ret->sexp = result;
@@ -321,7 +321,7 @@
   int i;
   int size;
 
-  lockGcrypt();    
+  lockGcrypt();
 #if EXTRA_CHECKS
   if (gcry_pk_testkey(hostkey->sexp)) {
     BREAK();
@@ -340,7 +340,7 @@
                       hostkey->sexp,
                       "rsa",
                       "nedpqu");
-  if (rc) 
+  if (rc)
     rc = key_from_sexp(pkv,
                       hostkey->sexp,
                       "private-key",
@@ -350,7 +350,7 @@
                       hostkey->sexp,
                       "rsa",
                       "nedpq");
-  if (rc) 
+  if (rc)
     rc = key_from_sexp(pkv,
                       hostkey->sexp,
                       "private-key",
@@ -375,7 +375,7 @@
       size += sizes[i];
       if (rc) {
        LOG_GCRY(LOG_ERROR, "gcry_mpi_aprint", rc);
-       while (i>0) 
+       while (i>0)
          if (pbu[i] != NULL)
            free(pbu[--i]);     
        for (i=0;i<6;i++)
@@ -394,34 +394,34 @@
   retval->len = htons(size);
   i = 0;
   retval->sizen = htons(sizes[0]);
-  memcpy(&((char*)(&retval[1]))[i], 
+  memcpy(&((char*)(&retval[1]))[i],
         pbu[0],
         sizes[0]);
   i += sizes[0];
   retval->sizee = htons(sizes[1]);
-  memcpy(&((char*)(&retval[1]))[i], 
+  memcpy(&((char*)(&retval[1]))[i],
         pbu[1],
         sizes[1]);
   i += sizes[1];
   retval->sized = htons(sizes[2]);
-  memcpy(&((char*)(&retval[1]))[i], 
+  memcpy(&((char*)(&retval[1]))[i],
         pbu[2],
         sizes[2]);
   i += sizes[2];
   /* swap p and q! */
   retval->sizep = htons(sizes[4]);
-  memcpy(&((char*)(&retval[1]))[i], 
+  memcpy(&((char*)(&retval[1]))[i],
         pbu[4],
         sizes[4]);
   i += sizes[4];
   retval->sizeq = htons(sizes[3]);
-  memcpy(&((char*)(&retval[1]))[i], 
+  memcpy(&((char*)(&retval[1]))[i],
         pbu[3],
         sizes[3]);
   i += sizes[3];
   retval->sizedmp1 = htons(0);
   retval->sizedmq1 = htons(0);
-  memcpy(&((char*)(&retval[1]))[i], 
+  memcpy(&((char*)(&retval[1]))[i],
         pbu[5],
         sizes[5]);
   for (i=0;i<6;i++) {
@@ -451,7 +451,7 @@
   lockGcrypt();
   rc = gcry_mpi_scan(&n,
                     GCRYMPI_FMT_USG,
-                    &((char*)(&encoding[1]))[pos], 
+                    &((char*)(&encoding[1]))[pos],
                     size,
                     &size);
   pos += ntohs(encoding->sizen);
@@ -463,7 +463,7 @@
   size = ntohs(encoding->sizee);
   rc = gcry_mpi_scan(&e,
                     GCRYMPI_FMT_USG,
-                    &((char*)(&encoding[1]))[pos], 
+                    &((char*)(&encoding[1]))[pos],
                     size,
                     &size);
   pos += ntohs(encoding->sizee);
@@ -476,7 +476,7 @@
   size = ntohs(encoding->sized);
   rc = gcry_mpi_scan(&d,
                     GCRYMPI_FMT_USG,
-                    &((char*)(&encoding[1]))[pos], 
+                    &((char*)(&encoding[1]))[pos],
                     size,
                     &size);
   pos += ntohs(encoding->sized);
@@ -492,7 +492,7 @@
   if (size > 0) {
     rc = gcry_mpi_scan(&q,
                       GCRYMPI_FMT_USG,
-                      &((char*)(&encoding[1]))[pos], 
+                      &((char*)(&encoding[1]))[pos],
                       size,
                       &size);
     pos += ntohs(encoding->sizep);
@@ -510,7 +510,7 @@
   if (size > 0) {
     rc = gcry_mpi_scan(&p,
                       GCRYMPI_FMT_USG,
-                      &((char*)(&encoding[1]))[pos], 
+                      &((char*)(&encoding[1]))[pos],
                       size,
                       &size);
     pos += ntohs(encoding->sizeq);
@@ -528,12 +528,12 @@
     p = NULL;
   pos += ntohs(encoding->sizedmp1);
   pos += ntohs(encoding->sizedmq1);
-  
+
   size = ntohs(encoding->len) - sizeof(PrivateKeyEncoded) - pos;
   if (size > 0) {
     rc = gcry_mpi_scan(&u,
                       GCRYMPI_FMT_USG,
-                      &((char*)(&encoding[1]))[pos], 
+                      &((char*)(&encoding[1]))[pos],
                       size,
                       &size);
     if (rc) {
@@ -582,7 +582,7 @@
   if (u != NULL)
     gcry_mpi_release(u);
 
-  if (rc) 
+  if (rc)
     LOG_GCRY(LOG_ERROR, "gcry_sexp_build", rc);
 #if EXTRA_CHECKS
   if (gcry_pk_testkey(res)) {
@@ -607,7 +607,7 @@
  * @param target where to store the encrypted block
  * @returns SYSERR on error, OK if ok
  */
-int encryptPrivateKey(const void * block, 
+int encryptPrivateKey(const void * block,
                      unsigned short size,
                      const PublicKey * publicKey,
                      RSAEncryptedData * target) {
@@ -646,10 +646,10 @@
     unlockGcrypt();
     return SYSERR;
   }
-  
+
   rc = gcry_pk_encrypt(&result, data, pubkey->sexp);
   if (rc) {
-    LOG_GCRY(LOG_ERROR, "gcry_pk_encrypt", rc); 
+    LOG_GCRY(LOG_ERROR, "gcry_pk_encrypt", rc);
     gcry_sexp_release(data);
     freePrivateKey(pubkey);
     unlockGcrypt();
@@ -672,7 +672,7 @@
   rc = gcry_mpi_print(GCRYMPI_FMT_USG,
                      (char*)target,
                      isize,
-                     &isize, 
+                     &isize,
                      rval);
   gcry_mpi_release(rval);
   if (rc) {
@@ -688,7 +688,7 @@
 }
 
 /**
- * Decrypt a given block with the hostkey. 
+ * Decrypt a given block with the hostkey.
  *
  * @param hostkey the hostkey with which to decrypt this block
  * @param block the data to decrypt, encoded as returned by encrypt
@@ -697,7 +697,7 @@
  *        the decrypted block is bigger, an error is returned
  * @returns the size of the decrypted block, -1 on error
  */
-int decryptPrivateKey(const struct PrivateKey * hostkey, 
+int decryptPrivateKey(const struct PrivateKey * hostkey,
                      const RSAEncryptedData * block,
                      void * result,
                      unsigned short max) {
@@ -793,7 +793,7 @@
  * @param sig where to write the signature
  * @return SYSERR on error, OK on success
  */
-int sign(const struct PrivateKey * hostkey, 
+int sign(const struct PrivateKey * hostkey,
         unsigned short size,
         const void * block,
         Signature * sig) {
@@ -819,7 +819,7 @@
   lockGcrypt();
   rc = gcry_sexp_new(&data,
                     buff,
-                    bufSize, 
+                    bufSize,
                     0);
   FREE(buff);
   if (rc) {
@@ -836,7 +836,7 @@
   }
   rc = key_from_sexp(&rval,
                     result,
-                    "rsa", 
+                    "rsa",
                     "s");
   gcry_sexp_release(result);
   if (rc) {
@@ -856,7 +856,7 @@
     unlockGcrypt();
     return SYSERR;
   }
-  adjust(&sig->sig[0], 
+  adjust(&sig->sig[0],
         ssize,
         sizeof(Signature));
   unlockGcrypt();
@@ -867,14 +867,14 @@
  * Verify signature.
  *
  * @param block the signed data
- * @param len the length of the block 
+ * @param len the length of the block
  * @param sig signature
  * @param publicKey public key of the signer
  * @returns OK if ok, SYSERR if invalid
  */
 int verifySig(const void * block,
              unsigned short len,
-             const Signature * sig,          
+             const Signature * sig,    
              const PublicKey * publicKey) {
   gcry_sexp_t data;
   gcry_sexp_t sigdata;
@@ -886,7 +886,7 @@
   int bufSize;
   size_t erroff;
   int rc;
- 
+
   size = sizeof(Signature);
   lockGcrypt();
   rc = gcry_mpi_scan(&val,
@@ -908,26 +908,26 @@
     LOG_GCRY(LOG_ERROR, "gcry_sexp_build", rc);
     unlockGcrypt();
     return SYSERR;
-  }  
+  }
   hash(block, len, &hc);
   bufSize = strlen(FORMATSTRING) + 1;
   buff = MALLOC(bufSize);
   memcpy(buff,
         FORMATSTRING,
         bufSize);
-  memcpy(&buff[strlen(FORMATSTRING) - 
+  memcpy(&buff[strlen(FORMATSTRING) -
               
strlen("0123456789012345678901234567890123456789012345678901234567890123))")],
         &hc,
         sizeof(HashCode512));
   rc = gcry_sexp_new(&data,
                     buff,
-                    bufSize, 
+                    bufSize,
                     0);
   FREE(buff);
   hostkey = public2PrivateKey(publicKey);
   rc = gcry_pk_verify(sigdata,
                      data,
-                     hostkey->sexp);  
+                     hostkey->sexp);
   freePrivateKey(hostkey);
   gcry_sexp_release(data);
   gcry_sexp_release(sigdata);

Modified: GNUnet/src/util/hostkeytest.c
===================================================================
--- GNUnet/src/util/hostkeytest.c       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/hostkeytest.c       2005-03-20 23:54:53 UTC (rev 464)
@@ -33,16 +33,16 @@
                                    strlen(TESTSTRING)+1,
                                    &pkey,
                                    &target)) {
-      fprintf(stderr, 
+      fprintf(stderr,
              "encryptPrivateKey returned SYSERR\n");
       ok++;
       continue;
     }
     if (-1 == decryptPrivateKey(hostkey,
-                               &target, 
+                               &target,
                                result,
                                strlen(TESTSTRING)+1)) {
-     fprintf(stderr, 
+     fprintf(stderr,
              "decryptPrivateKey returned SYSERR\n");
       ok++;
       continue;
@@ -51,14 +51,14 @@
     if (strncmp(TESTSTRING, result,
                strlen(TESTSTRING)) != 0) {
       printf("%s != %.*s - testEncryptDecrypt failed!\n",
-            TESTSTRING, 
-            MAX_TESTVAL, 
+            TESTSTRING,
+            MAX_TESTVAL,
             result);
       ok++;
       continue;
     }
   }
-  printf("%d RSA encrypt/decrypt operations %ds (%d failures)\n", 
+  printf("%d RSA encrypt/decrypt operations %ds (%d failures)\n",
         ITER,
         (int) (TIME(NULL)-start),
         ok);
@@ -93,16 +93,16 @@
                                    sizeof(SESSIONKEY),
                                    &pkey,
                                    &target)) {
-      fprintf(stderr, 
+      fprintf(stderr,
              "encryptPrivateKey returned SYSERR\n");
       ok++;
       continue;
     }
     if (-1 == decryptPrivateKey(hostkey,
-                               &target, 
+                               &target,
                                &outsk,
                                sizeof(SESSIONKEY))) {
-      fprintf(stderr, 
+      fprintf(stderr,
              "decryptPrivateKey returned SYSERR\n");
       ok++;
       continue;
@@ -115,7 +115,7 @@
       continue;
     }
   }
-  printf("%d RSA encrypt/decrypt SK operations %ds (%d failures)\n", 
+  printf("%d RSA encrypt/decrypt SK operations %ds (%d failures)\n",
         ITER,
         (int) (TIME(NULL)-start),
         ok);
@@ -133,24 +133,24 @@
   int i;
   TIME_T start;
   int ok = OK;
-  
+
   fprintf(stderr, "W");
   hostkey = makePrivateKey();
   getPublicKey(hostkey, &pkey);
   TIME(&start);
   for (i=0;i<ITER;i++) {
     fprintf(stderr, ".");
-    if (SYSERR == sign(hostkey, 
-                      strlen(TESTSTRING), 
-                      TESTSTRING, 
+    if (SYSERR == sign(hostkey,
+                      strlen(TESTSTRING),
+                      TESTSTRING,
                       &sig)) {
       fprintf(stderr,
              "sign returned SYSERR\n");
       ok = SYSERR;
       continue;
     }
-    if (SYSERR == verifySig(TESTSTRING, 
-                           strlen(TESTSTRING), 
+    if (SYSERR == verifySig(TESTSTRING,
+                           strlen(TESTSTRING),
                            &sig,
                            &pkey)) {
       printf("testSignVerify failed!\n");
@@ -158,8 +158,8 @@
       continue;
     }
   }
-  printf("%d RSA sign/verify operations %ds\n", 
-        ITER, 
+  printf("%d RSA sign/verify operations %ds\n",
+        ITER,
         (int) (TIME(NULL)-start));
   freePrivateKey(hostkey);
   return ok;
@@ -201,28 +201,28 @@
     }
     hostkey = decodePrivateKey(encoding);
     FREE(encoding);
-    if (SYSERR == decryptPrivateKey(hostkey, 
-                                   &target, 
-                                   result, 
+    if (SYSERR == decryptPrivateKey(hostkey,
+                                   &target,
+                                   result,
                                    strlen(TESTSTRING)+1)) {
       fprintf(stderr,
              "decryptPrivateKey returned SYSERR\n");
       ok = SYSERR;
       continue;
-    }  
+    }
     if (strncmp(TESTSTRING, result,
                strlen(TESTSTRING)) != 0) {
       printf("%s != %.*s - testEncryptDecrypt failed!\n",
-            TESTSTRING, 
-            (int) strlen(TESTSTRING), 
+            TESTSTRING,
+            (int) strlen(TESTSTRING),
             result);
       ok = SYSERR;
       continue;
     }
-  }  
+  }
   freePrivateKey(hostkey);
-  printf("%d RSA encrypt/encode/decode/decrypt operations %ds\n", 
-        ITER, 
+  printf("%d RSA encrypt/encode/decode/decrypt operations %ds\n",
+        ITER,
         (int) (TIME(NULL)-start));
   return ok;
 }
@@ -233,15 +233,15 @@
   int failureCount = 0;
 
   initLockingGcrypt();
-  initRAND();  
+  initRAND();
   if (OK != testEncryptDecryptSK())
      failureCount++;
   if (OK != testEncryptDecrypt())
      failureCount++;
   if (OK != testSignVerify())
-    failureCount++;       
-  if (OK != testPrivateKeyEncoding()) 
     failureCount++;
+  if (OK != testPrivateKeyEncoding())
+    failureCount++;
   doneLockingGcrypt();
 
   if (failureCount == 0)

Modified: GNUnet/src/util/identitytest.c
===================================================================
--- GNUnet/src/util/identitytest.c      2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/identitytest.c      2005-03-20 23:54:53 UTC (rev 464)
@@ -1,4 +1,4 @@
-/** 
+/**
  * @file test/identitytest.c
  * @brief testcase for util/identity.c
  */
@@ -15,9 +15,9 @@
 }
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   char c;
 
@@ -27,18 +27,18 @@
       { "config",  1, 0, 'c' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
-                     "c:", 
-                     long_options, 
+                     argv,
+                     "c:",
+                     long_options,
                      &option_index);
-    
-    if (c == -1) 
+
+    if (c == -1)
       break;  /* No more flags to process */
-    
+
     switch(c) {
-    case 'c': 
+    case 'c':
       FREENONNULL(setConfigurationString("FILES",
                                         "gnunet.conf",
                                         GNoptarg));
@@ -62,7 +62,7 @@
   ret = check();
   if (ret != 0)
     fprintf(stderr,
-           "ERROR %d.  Did you configure GNUnet properly?\n", 
+           "ERROR %d.  Did you configure GNUnet properly?\n",
            ret);
   doneUtil();
   return ret;

Modified: GNUnet/src/util/initialize.c
===================================================================
--- GNUnet/src/util/initialize.c        2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/initialize.c        2005-03-20 23:54:53 UTC (rev 464)
@@ -36,7 +36,7 @@
 /**
  * Initialize Random number generator.
  */
-void initRAND(); 
+void initRAND();
 
 /**
  * This method must be called first. Typically,
@@ -81,12 +81,12 @@
  */
 void doneStatusCalls();
 
-/** 
+/**
  * Initialize identity module. Requries configuration.
  */
 int initAddress();
 
-/** 
+/**
  * Shutdown identity module.
  */
 void doneAddress();
@@ -139,7 +139,7 @@
   if (testConfigurationString("GNUNETD",
                              "_MAGIC_",
                              "YES")) {
-    initStatusCalls(); 
+    initStatusCalls();
     if (OK != initAddress()) {
       initState();
       return SYSERR;
@@ -160,7 +160,7 @@
   doneState();
   LOG(LOG_MESSAGE,
       _("Shutdown complete.\n"));
-  doneLogging();  
+  doneLogging();
   doneConfiguration();
 #ifdef MINGW
   ShutdownWinEnv();

Modified: GNUnet/src/util/io.c
===================================================================
--- GNUnet/src/util/io.c        2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/io.c        2005-03-20 23:54:53 UTC (rev 464)
@@ -32,7 +32,7 @@
 #ifndef LINUX
 static void catcher(int sig) {
   LOG(LOG_INFO,
-      _("Caught signal %d.\n"), 
+      _("Caught signal %d.\n"),
       sig);
   /* re-install signal handler! */
   signal(sig, catcher);
@@ -45,7 +45,7 @@
 #if ! (defined(LINUX) || defined(MINGW))
   if ( SIG_ERR == signal(SIGPIPE, SIG_IGN))
     if ( SIG_ERR == signal(SIGPIPE, catcher))
-      LOG_STRERROR(LOG_WARNING, "signal"); 
+      LOG_STRERROR(LOG_WARNING, "signal");
 #endif
 }
 
@@ -57,14 +57,14 @@
  * of socket s.
  *
  * @param doBlock use YES to change the socket to blocking, NO to non-blocking
- * @return Upon successful completion, it returns zero, otherwise -1 
+ * @return Upon successful completion, it returns zero, otherwise -1
  */
-int setBlocking(int s, int doBlock) {  
+int setBlocking(int s, int doBlock) {
 #if MINGW
   u_long l = !doBlock;
   if (ioctlsocket(s, FIONBIO, &l) == SOCKET_ERROR) {
     SetErrnoFromWinsockError(WSAGetLastError());
-    
+
     return -1;
   } else {
     /* store the blocking mode */
@@ -78,8 +78,8 @@
   else
     flags |= O_NONBLOCK;
 
-  return fcntl(s, 
-              F_SETFL, 
+  return fcntl(s,
+              F_SETFL,
               flags);
 #endif
 }
@@ -114,14 +114,14 @@
  *             0 is returned if no more bytes can be read
  * @return SYSERR on error, YES on success or NO if the operation
  *         would have blocked
- */ 
+ */
 int RECV_NONBLOCKING(int s,
                     void * buf,
                     size_t max,
-                    size_t *read) {  
+                    size_t *read) {
   int flags;
 
-  setBlocking(s, NO);  
+  setBlocking(s, NO);
 
 #ifdef CYGWIN
     flags = MSG_NOSIGNAL;
@@ -142,7 +142,7 @@
                          max,
                          flags);
   } while ( ( *read == -1) && ( errno == EINTR) );
-  
+
   setBlocking(s, YES);
 
   if (*read == SYSERR && (errno == EWOULDBLOCK || errno == EAGAIN))
@@ -191,7 +191,7 @@
     pos += i;
   }
   GNUNET_ASSERT(pos == len);
-  
+
   setBlocking(s, NO);
 
   return pos;
@@ -210,12 +210,12 @@
  * @param max maximum number of bytes to send
  * @param sent number of bytes actually sent
  * @return SYSERR on error, YES on success or
- *         NO if the operation would have blocked. 
- */ 
+ *         NO if the operation would have blocked.
+ */
 int SEND_NONBLOCKING(int s,
                     const void * buf,
                     size_t max,
-                    size_t *sent) {  
+                    size_t *sent) {
   int flags;
 
   setBlocking(s, NO);
@@ -246,7 +246,7 @@
            (errno == EINTR) );
 
   setBlocking(s, YES);
-  
+
   if (*sent == SYSERR && (errno == EWOULDBLOCK || errno == EAGAIN))
     return NO;
   else if ( (*sent < 0) || (*sent > max) )
@@ -276,19 +276,19 @@
     flags = MSG_NOSIGNAL;
 #else
     flags = 0;
-#endif  
+#endif
     i = SEND(s,
             &((char*)buf)[pos],
             len - pos,
             flags);
-    
+
     if ( (i == -1) &&
         (errno == EINTR) )
       continue; /* ingnore interrupts */
     if (i <= 0) {
       if (i == -1)
        LOG_STRERROR(LOG_WARNING, "send");
-      return SYSERR;    
+      return SYSERR;
     }
     pos += i;
   }
@@ -323,36 +323,36 @@
 #ifdef MINGW
   char szFile[_MAX_PATH + 1];
   long lRet;
-  
+
   if ((lRet = conv_to_win_path(filename, szFile)) != ERROR_SUCCESS)
   {
     errno = ENOENT;
     SetLastError(lRet);
-    
+
     return -1;
   }
   fn = szFile;
 #else
   fn = (char *) filename;
 #endif
-  
+
   if (oflag & O_CREAT)
   {
     va_list arg;
     va_start(arg, oflag);
     mode = va_arg(arg, int);
-    va_end(arg);    
+    va_end(arg);
   }
   else
   {
     mode = 0;
   }
-  
+
 #ifdef MINGW
   /* Set binary mode */
   mode |= O_BINARY;
 #endif
-  
+
   return open(fn, oflag, mode);
 }
 

Modified: GNUnet/src/util/ipcheck.c
===================================================================
--- GNUnet/src/util/ipcheck.c   2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/ipcheck.c   2005-03-20 23:54:53 UTC (rev 464)
@@ -76,7 +76,7 @@
     if (routeList[i] == ';')
       count++;
   result = MALLOC(sizeof(CIDRNetwork) * (count+1));
-  /* add termination */  
+  /* add termination */
   memset(result,
         0,
         sizeof(CIDRNetwork)*(count+1));
@@ -104,14 +104,14 @@
        }
       result[i].network.addr
        = htonl((temps[0] << 24) + (temps[1] << 16) + (temps[2] << 8) + 
temps[3]);
-      result[i].netmask.addr 
+      result[i].netmask.addr
        = htonl((temps[4] << 24) + (temps[5] << 16) + (temps[6] << 8) + 
temps[7]);
       while (routeList[pos] != ';')
        pos++;
       pos++;
       i++;
       continue;
-    } 
+    }
     /* try second notation */
     cnt = sscanf(&routeList[pos],
                 "%u.%u.%u.%u/%u;",
@@ -144,7 +144,7 @@
          pos++;
        pos++;
        i++;
-       continue;       
+       continue;
       } else {
        LOG(LOG_ERROR,
            _("Invalid network notation ('/%d' is not legal in IPv4 CIDR)."),
@@ -152,7 +152,7 @@
        FREE(result);
        return NULL; /* error */
       }
-    } 
+    }
     LOG(LOG_ERROR,
        "invalid network notation: >>%s<<",
        &routeList[pos]);
@@ -182,17 +182,17 @@
                  IPaddr ip) {
   int i;
   IPaddr add;
- 
+
   add = ip;
   i=0;
-  if (list == NULL) 
+  if (list == NULL)
     return NO;
-  
+
   while ( (list[i].network.addr != 0) ||
          (list[i].netmask.addr != 0) ) {
-    if ( (add.addr & list[i].netmask.addr) == 
-        (list[i].network.addr & list[i].netmask.addr) ) 
-      return YES;    
+    if ( (add.addr & list[i].netmask.addr) ==
+        (list[i].network.addr & list[i].netmask.addr) )
+      return YES;
     i++;
   }
   return NO;
@@ -238,25 +238,25 @@
     FREE(routeList);
     return NULL;
   }
-    
+
   result = MALLOC(sizeof(CIDR6Network) * (count+1));
-  memset(result, 
+  memset(result,
         0,
         sizeof(CIDR6Network) * (count+1));
   i=0;
   pos = 0;
   while (i < count) {
     start = pos;
-    while (routeList[pos] != ';') 
+    while (routeList[pos] != ';')
       pos++;
     slash = pos;
     while ( (slash >= start) &&
            (routeList[slash] != '/') )
       slash--;
     if (slash < start) {
-      memset(&result[i].netmask, 
+      memset(&result[i].netmask,
             0xFF,
-            sizeof(IP6addr));       
+            sizeof(IP6addr));  
       slash = pos;
     } else {
       routeList[pos] = '\0';
@@ -304,11 +304,11 @@
   unsigned int i;
   unsigned int j;
   struct in6_addr zero;
- 
+
   i=0;
-  if (list == NULL) 
+  if (list == NULL)
     return NO;
-  
+
   memset(&zero, 0, sizeof(struct in6_addr));
   while ( (memcmp(&zero, &list[i].network, sizeof(struct in6_addr)) != 0) ||
          (memcmp(&zero, &list[i].netmask, sizeof(struct in6_addr)) != 0) ) {

Modified: GNUnet/src/util/kblockkey.c
===================================================================
--- GNUnet/src/util/kblockkey.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/kblockkey.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -18,10 +18,10 @@
      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
      Boston, MA 02111-1307, USA.
 
-     Note: This code is based on code from libgcrypt 
+     Note: This code is based on code from libgcrypt
      The code was adapted for GNUnet to support RSA-key generation
      based on weak, pseudo-random keys.  Do NOT use to generate
-     ordinary RSA keys!     
+     ordinary RSA keys!
 */
 
 
@@ -30,7 +30,7 @@
  * @brief implementation of RSA-Key generation for KBlocks
  *        (do NOT use for pseudonyms or hostkeys!)
  * @author Christian Grothoff
- */ 
+ */
 
 #include "platform.h"
 #include "gnunet_util.h"
@@ -144,7 +144,7 @@
 static unsigned int get_trailing_zeros(mpz_t a) {
   unsigned int count = 0;
   unsigned int nbits = get_nbits(a);
-  
+
   while ( (mpz_tstbit(a, count)) && (count < nbits) )
     count++;
   return count;
@@ -153,9 +153,9 @@
 /**
  * Set bit N of A. and clear all bits above
  */
-static void set_highbit(mpz_t a, 
+static void set_highbit(mpz_t a,
                        unsigned int n) {
-  unsigned int nbits;  
+  unsigned int nbits;
 
   nbits = get_nbits(a);
   while (nbits > n)
@@ -172,7 +172,7 @@
 
   cnt = (nbits / sizeof(HashCode512) / 8) + 1;
   tmp = MALLOC(sizeof(HashCode512) * cnt);
-  
+
   tmp[0] = *rnd;
   for (i=0;i<cnt-1;i++) {
     hash(&tmp[i],
@@ -189,7 +189,7 @@
 
   mpz_import(n, cnt * sizeof(HashCode512) / sizeof(unsigned int),
             1, sizeof(unsigned int), 1, 0, tmp);
-  FREE(tmp); 
+  FREE(tmp);
   i = get_nbits(n);
   while (i > nbits)
     mpz_clrbit(n, i--);
@@ -198,7 +198,7 @@
 /**
  * Return true if n is probably a prime
  */
-static int is_prime (mpz_t n, 
+static int is_prime (mpz_t n,
                     int steps,
                     HashCode512 * hc) {
   mpz_t x;
@@ -229,7 +229,7 @@
       mpz_set_ui( x, 2 );
     } else {
       mpz_randomize( x, nbits, hc );
-      
+
       /* Make sure that the number is smaller than the prime and
         keep the randomness of the high bit. */
       if (mpz_tstbit(x, nbits-2) ) {
@@ -265,14 +265,14 @@
 }
 
 static void gen_prime(mpz_t ptest,
-                     unsigned int nbits, 
+                     unsigned int nbits,
                      HashCode512 * hc) {
   mpz_t prime, pminus1, val_2, val_3, result;
   int i;
   unsigned x, step;
   int *mods;
   mpz_t tmp;
-  
+
   GNUNET_ASSERT(nbits >= 16);
 
   mods = MALLOC(no_of_small_prime_numbers * sizeof(*mods));
@@ -293,7 +293,7 @@
     set_highbit (prime, nbits-1);
     mpz_setbit(prime, nbits-2);
     mpz_setbit(prime, 0);
-    
+
     /* Calculate all remainders. */
     mpz_init(tmp);
     for (i=0; (x = small_prime_numbers[i]); i++ )
@@ -314,11 +314,11 @@
       mpz_add_ui( ptest, prime, step );
       if (! mpz_tstbit( ptest, nbits-2 ))
        break;
-      
+
       /* Do a fast Fermat test now. */
       mpz_sub_ui( pminus1, ptest, 1);
       mpz_powm( result, val_2, pminus1, ptest );
-      if ( ( !mpz_cmp_ui( result, 1 ) ) &&       
+      if ( ( !mpz_cmp_ui( result, 1 ) ) &&     
           (is_prime(ptest, 5, hc) ) ) {                
        /* Got it. */
        mpz_clear(val_2);
@@ -338,13 +338,13 @@
  * Return: 1 if this 1, 0 in all other cases
  */
 static int test_gcd(mpz_t g,
-                   mpz_t xa, 
+                   mpz_t xa,
                    mpz_t xb) {
   mpz_t a, b;
 
   mpz_init_set(a, xa);
   mpz_init_set(b, xb);
-  
+
   /* TAOCP Vol II, 4.5.2, Algorithm A */
   while (mpz_cmp_ui( b, 0 ) ) {
     mpz_fdiv_r(g, a, b); /* g used as temorary variable */
@@ -352,14 +352,14 @@
     mpz_set(b,g);
   }
   mpz_set(g, a);
-  
+
   mpz_clear(a);
   mpz_clear(b);
   return (0 == mpz_cmp_ui(g, 1));
 }
 
 /**
- * Generate a key pair with a key of size NBITS.  
+ * Generate a key pair with a key of size NBITS.
  * @param sk where to store the key
  * @param nbits the number of bits to use
  * @param hc the HC to use for PRNG (modified!)
@@ -374,7 +374,7 @@
 
   /* make sure that nbits is even so that we generate p, q of equal size */
   if ( (nbits&1) )
-    nbits++; 
+    nbits++;
 
   mpz_init_set_ui(sk->e, 257);
   mpz_init(sk->n);
@@ -393,24 +393,24 @@
     do {
       gen_prime(sk->p, nbits/2, hc);
       gen_prime(sk->q, nbits/2, hc);
-      
+
       if (mpz_cmp (sk->p, sk->q) > 0 ) /* p shall be smaller than q (for calc 
of u)*/
        mpz_swap(sk->p, sk->q);
       /* calculate the modulus */
       mpz_mul(sk->n, sk->p, sk->q );
     } while (get_nbits(sk->n) != nbits);
-    
+
     /* calculate Euler totient: phi = (p-1)(q-1) */
     mpz_sub_ui(t1, sk->p, 1 );
     mpz_sub_ui(t2, sk->q, 1 );
     mpz_mul(phi, t1, t2 );
     mpz_gcd(g, t1, t2);
     mpz_fdiv_q(f, phi, g);
-    
-    while (0 == test_gcd(t1, sk->e, phi)) { /* (while gcd is not 1) */ 
+
+    while (0 == test_gcd(t1, sk->e, phi)) { /* (while gcd is not 1) */
       mpz_add_ui (sk->e, sk->e, 2);
     }
-    
+
     /* calculate the secret key d = e^1 mod phi */
   } while ( (0 == mpz_invert(sk->d, sk->e, f )) ||
            (0 == mpz_invert(sk->u, sk->p, sk->q )) );
@@ -463,41 +463,41 @@
   retval->len = htons(size);
   i = 0;
   retval->sizen = htons(sizes[0]);
-  memcpy(&((char*)&retval[1])[i], 
+  memcpy(&((char*)&retval[1])[i],
         pbu[0],
         sizes[0]);
   i += sizes[0];
   retval->sizee = htons(sizes[1]);
-  memcpy(&((char*)&retval[1])[i], 
+  memcpy(&((char*)&retval[1])[i],
         pbu[1],
         sizes[1]);
   i += sizes[1];
   retval->sized = htons(sizes[2]);
-  memcpy(&((char*)&retval[1])[i], 
+  memcpy(&((char*)&retval[1])[i],
         pbu[2],
         sizes[2]);
   i += sizes[2];
   /* swap p and q! */
   retval->sizep = htons(sizes[4]);
-  memcpy(&((char*)&retval[1])[i], 
+  memcpy(&((char*)&retval[1])[i],
         pbu[4],
         sizes[4]);
   i += sizes[4];
   retval->sizeq = htons(sizes[3]);
-  memcpy(&((char*)&retval[1])[i], 
+  memcpy(&((char*)&retval[1])[i],
         pbu[3],
         sizes[3]);
   i += sizes[3];
   retval->sizedmp1 = htons(0);
   retval->sizedmq1 = htons(0);
-  memcpy(&((char*)&retval[1])[i], 
+  memcpy(&((char*)&retval[1])[i],
         pbu[5],
         sizes[5]);
   for (i=0;i<6;i++) {
     mpz_clear(*pkv[i]);
-    free(pbu[i]);  
+    free(pbu[i]);
   }
-  
+
   ret = decodePrivateKey(retval);
   FREE(retval);
   return ret;

Modified: GNUnet/src/util/kblockkey_test.c
===================================================================
--- GNUnet/src/util/kblockkey_test.c    2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/kblockkey_test.c    2005-03-20 23:54:53 UTC (rev 464)
@@ -1,4 +1,4 @@
-/** 
+/**
  * @file util/kblockkey_test.c
  * @brief testcase for util/kblockkey.c
  * @author Christian Grothoff
@@ -14,13 +14,13 @@
 
 
 static int testMultiKey(const char * word) {
-  HashCode512 in;  
+  HashCode512 in;
   struct PrivateKey * hostkey;
   PublicKey pkey;
   PublicKey pkey1;
   int i;
 
-  fprintf(stderr, 
+  fprintf(stderr,
          "Testing KBlock key uniqueness (%s) ",
          word);
   hash(word, strlen(word), &in);
@@ -45,7 +45,7 @@
     }
     getPublicKey(hostkey, &pkey1);
     freePrivateKey(hostkey);
-    if (0 != memcmp(&pkey, &pkey1, 
+    if (0 != memcmp(&pkey, &pkey1,
                    sizeof(PublicKey))) {
       BREAK();
     fprintf(stderr, " ERROR\n");
@@ -76,16 +76,16 @@
                                    strlen(TESTSTRING)+1,
                                    &pkey,
                                    &target)) {
-      fprintf(stderr, 
+      fprintf(stderr,
              "encryptPrivateKey returned SYSERR\n");
       ok++;
       continue;
     }
     if (-1 == decryptPrivateKey(hostkey,
-                               &target, 
+                               &target,
                                result,
                                strlen(TESTSTRING)+1)) {
-     fprintf(stderr, 
+     fprintf(stderr,
              "decryptPrivateKey returned SYSERR\n");
       ok++;
       continue;
@@ -93,14 +93,14 @@
     if (strncmp(TESTSTRING, result,
                strlen(TESTSTRING)) != 0) {
       printf("%s != %.*s - testEncryptDecrypt failed!\n",
-            TESTSTRING, 
-            MAX_TESTVAL, 
+            TESTSTRING,
+            MAX_TESTVAL,
             result);
       ok++;
       continue;
     }
   }
-  printf("%d RSA encrypt/decrypt operations %ds (%d failures)\n", 
+  printf("%d RSA encrypt/decrypt operations %ds (%d failures)\n",
         ITER,
         (int) (TIME(NULL)-start),
         ok);
@@ -116,7 +116,7 @@
   int i;
   TIME_T start;
   int ok = OK;
-  
+
   fprintf(stderr, "W");
   getPublicKey(hostkey, &pkey);
   TIME(&start);
@@ -130,17 +130,17 @@
       ok = SYSERR;
       continue;
     }
-    if (SYSERR == verifySig(TESTSTRING, 
-                           strlen(TESTSTRING), 
-                           &sig, 
+    if (SYSERR == verifySig(TESTSTRING,
+                           strlen(TESTSTRING),
+                           &sig,
                            &pkey)) {
       printf("testSignVerify failed!\n");
       ok = SYSERR;
       continue;
     }
   }
-  printf("%d RSA sign/verify operations %ds\n", 
-        ITER, 
+  printf("%d RSA sign/verify operations %ds\n",
+        ITER,
         (int) (TIME(NULL)-start));
   return ok;
 }
@@ -178,27 +178,27 @@
     }
     hostkey = decodePrivateKey(encoding);
     FREE(encoding);
-    if (SYSERR == decryptPrivateKey(hostkey, 
+    if (SYSERR == decryptPrivateKey(hostkey,
                                    &target,
-                                   result, 
+                                   result,
                                    strlen(TESTSTRING)+1)) {
       fprintf(stderr,
              "decryptPrivateKey returned SYSERR\n");
       ok = SYSERR;
       continue;
-    }  
+    }
     if (strncmp(TESTSTRING, result,
                strlen(TESTSTRING)) != 0) {
       printf("%s != %.*s - testEncryptDecrypt failed!\n",
-            TESTSTRING, 
-            (int) strlen(TESTSTRING), 
+            TESTSTRING,
+            (int) strlen(TESTSTRING),
             result);
       ok = SYSERR;
       continue;
     }
-  }  
-  printf("%d RSA encrypt/encode/decode/decrypt operations %ds\n", 
-        ITER, 
+  }
+  printf("%d RSA encrypt/encode/decode/decrypt operations %ds\n",
+        ITER,
         (int) (TIME(NULL)-start));
   return ok;
 }
@@ -213,14 +213,14 @@
   struct PrivateKey * hostkey;
 
   initLockingGcrypt();
-  initRAND();  
+  initRAND();
   makeRandomId(&in);
 
   hostkey = makeKblockKey(&in);
   if (hostkey == NULL) {
     printf("\nmakeKblockKey failed!\n");
     return 1;
-  } 
+  }
 
   if (OK != testMultiKey("foo"))
     failureCount++;
@@ -229,9 +229,9 @@
   if (OK != testEncryptDecrypt(hostkey))
     failureCount++;
   if (OK != testSignVerify(hostkey))
-    failureCount++;       
-  if (OK != testPrivateKeyEncoding(hostkey)) 
     failureCount++;
+  if (OK != testPrivateKeyEncoding(hostkey))
+    failureCount++;
   freePrivateKey(hostkey);
   doneLockingGcrypt();
 
@@ -241,5 +241,5 @@
     printf("\n\n%d TESTS FAILED!\n\n",
           failureCount);
     return -1;
-  }  
+  }
 }

Modified: GNUnet/src/util/locking_gcrypt.c
===================================================================
--- GNUnet/src/util/locking_gcrypt.c    2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/locking_gcrypt.c    2005-03-20 23:54:53 UTC (rev 464)
@@ -30,11 +30,11 @@
 static Mutex gcrypt_shared_lock;
 
 void lockGcrypt() {
-  MUTEX_LOCK(&gcrypt_shared_lock);  
+  MUTEX_LOCK(&gcrypt_shared_lock);
 }
 
 void unlockGcrypt() {
-  MUTEX_UNLOCK(&gcrypt_shared_lock);  
+  MUTEX_UNLOCK(&gcrypt_shared_lock);
 }
 
 void initLockingGcrypt() {

Modified: GNUnet/src/util/logging.c
===================================================================
--- GNUnet/src/util/logging.c   2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/logging.c   2005-03-20 23:54:53 UTC (rev 464)
@@ -72,9 +72,9 @@
 static unsigned int lastlog;
 
 /**
- * How long to keep logs, in days 
+ * How long to keep logs, in days
  */
-static int keepLog; 
+static int keepLog;
 
 /**
  * Base value for getting configuration options; either "GNUNETD" or
@@ -137,13 +137,13 @@
   if ( (ret == NULL) ||
        (ret[0] != '\0') ) {
     FREE(fullname);
-    return; /* not a logfile */  
+    return; /* not a logfile */
   }
 
-  if (t.tm_year*365 + t.tm_yday + keepLog 
-      < def->curtime.tm_year*365 + def->curtime.tm_yday) 
+  if (t.tm_year*365 + t.tm_yday + keepLog
+      < def->curtime.tm_year*365 + def->curtime.tm_yday)
     UNLINK(fullname);
-  
+
   FREE(fullname);
 }
 
@@ -152,19 +152,19 @@
  */
 void reopenLogFile() {
   char * logfilename;
-  
+
   logfilename
     = getConfigurationString(base,
-           "LOGFILE"); 
+           "LOGFILE");
   if (logfilename != NULL) {
     char * fn;
-    
+
     if ( (logfile != stderr) &&
    (logfile != NULL) ) {
       fclose(logfile);
       logfile = NULL;
     }
-    fn = expandFileName(logfilename);     
+    fn = expandFileName(logfilename);
     if (keepLog) {
       char * logdir;
       char * end;
@@ -172,7 +172,7 @@
       char datestr[80];
       time_t curtime;
       char *datefmt;
-      
+
       datefmt = nl_langinfo(D_FMT);
       time(&curtime);
 #ifdef localtime_r
@@ -181,30 +181,30 @@
       def.curtime = *localtime(&curtime);
 #endif
       lastlog = def.curtime.tm_yday;
-      
+
       /* Format current date for filename*/
       fn = (char *) realloc(fn, strlen(fn) + 82);
       strcat(fn, "_");
       def.basename = STRDUP(fn);
       GNUNET_ASSERT(0 != strftime(datestr,
           80,
-          datefmt, 
+          datefmt,
           &def.curtime));
       strcat(fn, datestr);
-      
+
       /* Remove old logs */
       logdir = STRDUP(fn);
       end = logdir + strlen(logdir);
       while (*end != DIR_SEPARATOR)
         end--;
       *end = 0;
-      scanDirectory(logdir, 
-        (DirectoryEntryCallback) removeOldLog, 
+      scanDirectory(logdir,
+        (DirectoryEntryCallback) removeOldLog,
         &def);
       FREE(def.basename);
       FREE(logdir);
     }
-        
+
     logfile = FOPEN(fn, "a+");
     if (logfile == NULL)
       logfile = stderr;
@@ -227,7 +227,7 @@
 void *getLogfile() {
   return logfile;
 }
- 
+
 /**
  * Convert a textual description of a loglevel into an int.
  */
@@ -239,7 +239,7 @@
     errexit(_("LOGLEVEL not specified, that is not ok.\n"));
   caplog = strdup(log);
   for (i=strlen(caplog)-1;i>=0;i--)
-    caplog[i] = toupper(caplog[i]);    
+    caplog[i] = toupper(caplog[i]);
   i = 0;
   while ( (loglevels[i] != NULL) &&
          ( (0 != strcmp(caplog, gettext(loglevels[i]))) &&
@@ -283,14 +283,14 @@
     }
   }
 
-  loglevel__ 
+  loglevel__
     = getLoglevel(loglevelname); /* will errexit if loglevel == NULL */
   if (! levelstatic)
     FREE(loglevelname);
   keepLog
     = getConfigurationInt(base,
                          "KEEPLOG");
-  reopenLogFile();  
+  reopenLogFile();
   MUTEX_UNLOCK(&logMutex);
 }
 
@@ -299,7 +299,7 @@
  */
 void initLogging() {
   MUTEX_CREATE_RECURSIVE(&logMutex);
- 
+
   bInited = YES;
   registerConfigurationUpdateCallback(&resetLogging);
   resetLogging();
@@ -328,14 +328,14 @@
     char timebuf[64];
     time_t timetmp;
     struct tm * tmptr;
- 
+
     time(&timetmp);
     tmptr = localtime(&timetmp);
-    GNUNET_ASSERT(0 != strftime(timebuf, 
-        64, 
-        "%b %d %H:%M:%S ", 
+    GNUNET_ASSERT(0 != strftime(timebuf,
+        64,
+        "%b %d %H:%M:%S ",
         tmptr));
-    fputs(timebuf, 
+    fputs(timebuf,
     logfile);
   }
 }
@@ -346,18 +346,18 @@
  *
  * @param filename where in the code did the problem occur
  * @param linenumber where in the code did the problem occur
- */ 
+ */
 void breakpoint_(const char * filename,
                  const int linenumber) {
   if (logfile != NULL) {
     printTime();
-    FPRINTF(logfile, 
+    FPRINTF(logfile,
            _("Failure at %s:%d.\n"),
-           filename, 
+           filename,
            linenumber);
     fflush(logfile);
   } else
-    FPRINTF(stderr, 
+    FPRINTF(stderr,
            _("Failure at at %s:%d.\n"),
            filename,
            linenumber);
@@ -387,7 +387,7 @@
  */
 void LOG(int minLogLevel,
         const char *format, ...) {
-  va_list      args;  
+  va_list      args;
   size_t len;
 
   if (loglevel__ < minLogLevel)
@@ -401,15 +401,15 @@
   if (logfile != NULL) {
     time_t curtime;
     struct tm *lcltime;
-    
+
     time(&curtime);
-    lcltime = localtime(&curtime); 
-    
+    lcltime = localtime(&curtime);
+
     if (lcltime->tm_yday != lastlog) {
       reopenLogFile();
       lastlog = lcltime->tm_yday;
     }
-    
+
     printTime();
     if (format[0] == ' ')
       FPRINTF(logfile, "%s:", gettext(loglevels[minLogLevel]));
@@ -425,13 +425,13 @@
   va_start(args, format);
   if (customLog) {
     char * txt;
-    
+
     txt = MALLOC(len + 1);
     GNUNET_ASSERT(len == VSNPRINTF(txt, len, format, args));
     customLog(txt);
     FREE(txt);
   }
-  va_end(args);  
+  va_end(args);
 }
 
 /**
@@ -449,7 +449,7 @@
     printTime();
     VFPRINTF(logfile, format, args);
     fflush(logfile);
-    va_end(args); 
+    va_end(args);
   }
   if (logfile != stderr) {
     va_start(args, format);

Modified: GNUnet/src/util/port.c
===================================================================
--- GNUnet/src/util/port.c      2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/port.c      2005-03-20 23:54:53 UTC (rev 464)
@@ -35,7 +35,7 @@
                                              "PORT");
   if (port == 0) { /* try lookup in services */
     errexit(_("Cannot determine port of gnunetd server. Define in 
configuration file in section '%s' under '%s'.\n"),
-           "NETWORK", 
+           "NETWORK",
            "PORT");
   }
   return port;
@@ -67,7 +67,7 @@
   host = getGNUnetdHost();
   if (SYSERR == initGNUnetClientSocket(getGNUnetPort(),
                                       host,
-                                      sock)) {    
+                                      sock)) {
     LOG(LOG_ERROR,
        _("Could not connect to gnunetd.\n"));
     FREE(sock);

Modified: GNUnet/src/util/printhelp.c
===================================================================
--- GNUnet/src/util/printhelp.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/printhelp.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -38,7 +38,7 @@
   int p;
   char * scp;
   const char * trans;
-          
+       
   printf(_("Usage: %s\n%s\n\n"),
         gettext(general),
         gettext(description));
@@ -58,7 +58,7 @@
       printf("=%s",
             opt[i].mandatoryArg);
       slen += 1+strlen(opt[i].mandatoryArg);
-    }    
+    }
     if (slen > BORDER) {
       printf("\n%*s", BORDER, "");
       slen = BORDER;
@@ -121,7 +121,7 @@
 int parseDefaultOptions(char c,
                        char * optarg) {
   switch(c) {
-  case 'c': 
+  case 'c':
     FREENONNULL(setConfigurationString("FILES",
                                       "gnunet.conf",
                                       optarg));

Modified: GNUnet/src/util/random_gcrypt.c
===================================================================
--- GNUnet/src/util/random_gcrypt.c     2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/random_gcrypt.c     2005-03-20 23:54:53 UTC (rev 464)
@@ -23,7 +23,7 @@
  * @file util/random_gcrypt.c
  * @brief functions to gather random numbers
  * @author Christian Grothoff
- */ 
+ */
 #include "platform.h"
 #include "gnunet_util.h"
 #include "locking_gcrypt.h"
@@ -46,7 +46,7 @@
 }
 
 /**
- * @return a random value in the interval [0,i[. 
+ * @return a random value in the interval [0,i[.
  */
 unsigned int randomi(unsigned int i) {
   static unsigned int invokeCount;
@@ -77,7 +77,7 @@
   int * ret;
   int i;
   int tmp;
-  unsigned int x;    
+  unsigned int x;
 
   GNUNET_ASSERT(n>0);
   ret = (int*)MALLOC(n * sizeof(int));

Modified: GNUnet/src/util/semaphore.c
===================================================================
--- GNUnet/src/util/semaphore.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/semaphore.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -22,7 +22,7 @@
  * @file util/semaphore.c
  * @brief functions related to threading and synchronization
  *
- * In particular, functions for mutexes, semaphores 
+ * In particular, functions for mutexes, semaphores
  * and thread creation are provided.
  */
 
@@ -44,9 +44,9 @@
 #include <pthread.h>
 #include <semaphore.h>
 #endif
-  
+
 /**
- * Shall we use error-checking (slow) 
+ * Shall we use error-checking (slow)
  * mutexes (e.g. for debugging)
  */
 #define USE_CHECKING_MUTEX 1
@@ -98,7 +98,7 @@
 #if WINDOWS
   attr = NULL;
 #endif
-  
+
   pthread_mutexattr_init(&attr);
 #if USE_CHECKING_MUTEX
 #if LINUX
@@ -126,7 +126,7 @@
   pthread_mutexattr_init(&attr);
 #if LINUX
   GNUNET_ASSERT(0 == pthread_mutexattr_setkind_np
-               (&attr,  
+               (&attr,
                 PTHREAD_MUTEX_RECURSIVE_NP));
 #elif SOMEBSD || FREEBSD || FREEBSD5
   GNUNET_ASSERT(0 == pthread_mutexattr_setkind_np
@@ -203,7 +203,7 @@
              "pthread_mutex_unlock",
              filename, line);
     GNUNET_ASSERT_FL(0, filename, line);
-  } 
+  }
 }
 
 /**
@@ -254,9 +254,9 @@
 
   GNUNET_ASSERT_FL(s != NULL, filename, linenumber);
   cond = s->cond;
-  MUTEX_LOCK(&(s->mutex));  
+  MUTEX_LOCK(&(s->mutex));
   (s->v)++;
-  value_after_op = s->v;  
+  value_after_op = s->v;
   GNUNET_ASSERT(0 == pthread_cond_signal(cond));
   MUTEX_UNLOCK(&(s->mutex));
   return value_after_op;
@@ -272,7 +272,7 @@
   int value_after_op;
   int return_value;
   pthread_cond_t * cond;
-  
+
   GNUNET_ASSERT_FL(s != NULL, filename, linenumber);
   cond = s->cond;
   MUTEX_LOCK(&(s->mutex));
@@ -283,7 +283,7 @@
   }
   (s->v)--;
   value_after_op = s->v;
-  MUTEX_UNLOCK(&(s->mutex));  
+  MUTEX_UNLOCK(&(s->mutex));
   return value_after_op;
 }
 
@@ -302,7 +302,7 @@
     return SYSERR;
   }
   (s->v)--;
-  MUTEX_UNLOCK(&(s->mutex));  
+  MUTEX_UNLOCK(&(s->mutex));
   return OK;
 }
 
@@ -348,10 +348,10 @@
  * @param handle handle to the pthread (for detaching, join)
  * @param main the main method of the thread
  * @param arg the argument to main
- * @param stackSize the size of the stack of the thread in bytes. 
- *        Note that if the stack overflows, some OSes (seen under BSD) 
+ * @param stackSize the size of the stack of the thread in bytes.
+ *        Note that if the stack overflows, some OSes (seen under BSD)
  *        will just segfault and gdb will give a messed-up stacktrace.
- * @return see pthread_create 
+ * @return see pthread_create
  */
 int PTHREAD_CREATE(PTHREAD_T * pt,
                   PThreadMain main,
@@ -369,10 +369,10 @@
   pthread_attr_init(&stack_size_custom_attr);
   pthread_attr_setstacksize(&stack_size_custom_attr,
                            stackSize);
-  ret = pthread_create(handle, 
+  ret = pthread_create(handle,
                       &stack_size_custom_attr,
-                      main, 
-                      arg);                        
+                      main,
+                      arg);                    
   if (ret != 0) {
     FREE(handle);
     pt->internal = NULL;
@@ -390,7 +390,7 @@
   handle = pt->internal;
   GNUNET_ASSERT(handle != NULL);
   switch ((k=pthread_join(*handle, ret))) {
-  case 0: 
+  case 0:
     FREE(handle);
     pt->internal = NULL;
     return;
@@ -413,7 +413,7 @@
     errexit("'%s' failed with error code %d: %s\n",
            "pthread_join",
            k,
-           STRERROR(errno));    
+           STRERROR(errno));
   }
 }
 
@@ -422,7 +422,7 @@
 
   handle = pt->internal;
   GNUNET_ASSERT(handle != NULL);
-  if (0 != pthread_detach(*handle)) 
+  if (0 != pthread_detach(*handle))
     LOG_STRERROR(LOG_ERROR, "pthread_detach");
   pt->internal = NULL;
   FREE(handle);
@@ -451,12 +451,12 @@
   #define PROCCOUNT 10000
 
   /**
-   * Implementation for a single semaphore actually uses three : 
+   * Implementation for a single semaphore actually uses three :
    *
    * 0 : actual semaphore value
-   * 1 : process counter 
+   * 1 : process counter
    * 2 : lock
-   */ 
+   */
 
   /* Various operations */
   static struct sembuf op_lock[2] = {
@@ -500,8 +500,8 @@
 static int LSEEK(int fd, off_t pos, int mode) {
   int ret;
   ret = lseek(fd, pos, mode);
-  if (ret == -1) 
-    LOG_STRERROR(LOG_ERROR, "lseek");  
+  if (ret == -1)
+    LOG_STRERROR(LOG_ERROR, "lseek");
   return ret;
 }
 #endif
@@ -525,7 +525,7 @@
     if (noslashBasename[i] == '/')
       noslashBasename[i] = '.'; /* first character MUST be /, but Solaris
                                   forbids it afterwards */
-  noslashBasename[0] = '/';  
+  noslashBasename[0] = '/';
   ret->internal = sem_open(noslashBasename,
                           O_CREAT,
                           S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP, /* 660 */
@@ -536,11 +536,11 @@
       break; /* definitely OS error... */
     noslashBasename[strlen(noslashBasename)/2] = '\0'; /* cut in half */
     ret->internal = sem_open(noslashBasename,
-                            O_CREAT,   
+                            O_CREAT,
                             S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP, /* 660 */
-                            initialValue);                          
+                            initialValue);                     
   }
-  if (ret->internal == (void *) SEM_FAILED) 
+  if (ret->internal == (void *) SEM_FAILED)
     DIE_FILE_STRERROR("sem_open", noslashBasename);
   FREE(noslashBasename);
   return rret;
@@ -558,19 +558,19 @@
   noslashBasename = STRDUP(basename);
   for (i=strlen(noslashBasename);i>0;i--)
     if (noslashBasename[i] == '\\')
-      noslashBasename[i] = '.'; /* must not contain backslashes */  
+      noslashBasename[i] = '.'; /* must not contain backslashes */
 
   sec.nLength = sizeof(SECURITY_ATTRIBUTES);
   sec.bInheritHandle = TRUE;
   sec.lpSecurityDescriptor = NULL;
-  
+
   ret->internal = CreateSemaphore(&sec, initialValue, LONG_MAX, 
noslashBasename);
   dwErr = GetLastError();
   if (! ret->internal && dwErr == ERROR_ALREADY_EXISTS) {
     ret->internal = OpenSemaphore(SEMAPHORE_MODIFY_STATE, TRUE, 
noslashBasename);
     dwErr = GetLastError();
   }
-  if (! ret->internal) { 
+  if (! ret->internal) {
     LOG(LOG_FAILURE, _("Can't create semaphore: %i"), dwErr);
     DIE_FILE_STRERROR("sem_open", noslashBasename);
   }
@@ -583,11 +583,11 @@
       ushort          *array;
   } semctl_arg;
   IPC_Semaphore * rret;
-  IPC_Semaphore_Internal * ret;  
+  IPC_Semaphore_Internal * ret;
   key_t key;
   FILE * fp;
   int pcount;
- 
+
   rret = MALLOC(sizeof(IPC_Semaphore));
   ret = MALLOC(sizeof(IPC_Semaphore_Internal));
   rret->platform = ret;
@@ -604,7 +604,7 @@
     return NULL;
   }
   fclose(fp);
-  
+
   key = ftok(basename,'g');
 
 again:
@@ -621,27 +621,27 @@
   }
 
   /* get process count */
-  if ( (pcount = semctl(ret->internal, 1, GETVAL, 0)) < 0) 
-    DIE_STRERROR_FL("semctl", filename, linenumber); 
+  if ( (pcount = semctl(ret->internal, 1, GETVAL, 0)) < 0)
+    DIE_STRERROR_FL("semctl", filename, linenumber);
   if (pcount==0) {
      semctl_arg.val = initialValue;
-     if (semctl(ret->internal, 0, SETVAL, semctl_arg) < 0) 
-       DIE_STRERROR_FL("semtcl", filename, linenumber);     
+     if (semctl(ret->internal, 0, SETVAL, semctl_arg) < 0)
+       DIE_STRERROR_FL("semtcl", filename, linenumber);
      semctl_arg.val = PROCCOUNT;
-     if (semctl(ret->internal, 1, SETVAL, semctl_arg) < 0) 
-       DIE_STRERROR_FL("semtcl", filename, linenumber); 
-  } 
+     if (semctl(ret->internal, 1, SETVAL, semctl_arg) < 0)
+       DIE_STRERROR_FL("semtcl", filename, linenumber);
+  }
 
-  if (semop(ret->internal, &op_endcreate[0], 2) < 0) 
-     DIE_STRERROR_FL("semop", filename, linenumber); 
-  
+  if (semop(ret->internal, &op_endcreate[0], 2) < 0)
+     DIE_STRERROR_FL("semop", filename, linenumber);
+
   ret->filename = STRDUP(basename);
-  return rret;  
+  return rret;
 #elif SOMEBSD
   int fd;
-  int cnt;  
+  int cnt;
   IPC_Semaphore * rret;
-  IPC_Semaphore_Internal * ret;  
+  IPC_Semaphore_Internal * ret;
 
   rret = MALLOC(sizeof(IPC_Semaphore));
   ret = MALLOC(sizeof(IPC_Semaphore_Internal));
@@ -683,9 +683,9 @@
       LOG_FILE_STRERROR(LOG_WARNING, "write", basename);
   }
   LSEEK(fd, sizeof(int), SEEK_SET);
-  if (sizeof(int) != READ(fd, &cnt, sizeof(int))) 
+  if (sizeof(int) != READ(fd, &cnt, sizeof(int)))
     cnt = htonl(1);
-  else 
+  else
     cnt = htonl(ntohl(cnt)+1);
   LSEEK(fd, sizeof(int), SEEK_SET);
   if (sizeof(int) != WRITE(fd, &cnt, sizeof(int)))
@@ -697,11 +697,11 @@
 #else
  #ifndef _MSC_VER
    #warning Port IPC.
-   return NULL; 
+   return NULL;
  #else
    return NULL;
  #endif
-#endif  
+#endif
 }
 
 void ipc_semaphore_up_(IPC_Semaphore * rsem,
@@ -728,7 +728,7 @@
 #elif LINUX
   {
     struct sembuf sops = {0,1,SEM_UNDO};
-    
+
     if (0 != semop(sem->internal,&sops,1))
       LOG(LOG_WARNING,
          "semop signaled error: %s at %s:%d\n",
@@ -737,10 +737,10 @@
          linenumber);
   }
 #elif SOMEBSD
-  { 
+  {
     int cnt;
-    
 
+
     MUTEX_LOCK(&sem->internalLock);
     FLOCK(sem->fd, LOCK_EX);
     LSEEK(sem->fd, 0, SEEK_SET);
@@ -814,7 +814,7 @@
 #elif LINUX
   {
     struct sembuf sops = {0,-1,SEM_UNDO};
-    
+
     while (0 != semop(sem->internal,&sops,1)) {
       switch(errno) {
       case EINTR:
@@ -842,7 +842,7 @@
 #elif SOMEBSD
   {
     int cnt;
-    
+
     MUTEX_LOCK(&sem->internalLock);
     FLOCK(sem->fd, LOCK_EX);
     cnt = ntohl(0);
@@ -865,7 +865,7 @@
        FLOCK(sem->fd, LOCK_EX);
       }
     }
-    
+
     cnt = htonl(ntohl(cnt)-1);
     LSEEK(sem->fd, 0, SEEK_SET);
     if (sizeof(int) != WRITE(sem->fd, &cnt, sizeof(int)))
@@ -873,7 +873,7 @@
          "could not write update to IPC file %s at %s:%d\n",
          sem->filename,
          __FILE__,
-         __LINE__); 
+         __LINE__);
     FLOCK(sem->fd, LOCK_UN);
     MUTEX_UNLOCK(&sem->internalLock);
   }
@@ -902,18 +902,18 @@
     "CloseHandle signaled error: %i at %s:%d\n",
     GetLastError(),
     filename,
-    linenumber);  
+    linenumber);
 #elif LINUX
   {
     int pcount;
-    
+
     if (semop(sem->internal, &op_close[0], 3) < 0)
       LOG(LOG_WARNING,
          "semop signaled error: %s at %s:%d\n",
          STRERROR(errno),
          filename,
          linenumber);
-    
+
     if ( (pcount = semctl(sem->internal, 1, GETVAL, 0)) < 0)
       LOG(LOG_WARNING,
          "semctl: %s at %s:%d\n",
@@ -941,12 +941,12 @@
            filename,
            linenumber);
     }
-    FREE(sem->filename);  
+    FREE(sem->filename);
   }
 #elif SOMEBSD
   {
-    int cnt;  
-    
+    int cnt;
+
     MUTEX_DESTROY(&sem->internalLock);
     FLOCK(sem->fd, LOCK_EX);
     LSEEK(sem->fd, sizeof(int), SEEK_SET);
@@ -960,9 +960,9 @@
            __FILE__,
            __LINE__);
       if (ntohl(cnt) == 0) {
-       UNLINK(sem->filename); 
+       UNLINK(sem->filename);
       }
-    } else 
+    } else
       LOG(LOG_WARNING,
          "could not read process count of IPC %s at %s:%d\n",
          sem->filename,

Modified: GNUnet/src/util/semaphoretest.c
===================================================================
--- GNUnet/src/util/semaphoretest.c     2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/semaphoretest.c     2005-03-20 23:54:53 UTC (rev 464)
@@ -1,4 +1,4 @@
-/** 
+/**
  * @file test/hashtest.c
  * @brief testcase for util/semaphore.c
  */
@@ -24,7 +24,7 @@
 static void lockIt() {
   sv = 0;
   fprintf(stderr, ".");
-  while (sv == 0) 
+  while (sv == 0)
     gnunet_util_sleep(50 * cronMILLIS); /* busy waiting may not always work */
   MUTEX_LOCK(&lock);
   sv = 1;
@@ -54,7 +54,7 @@
                 NULL,
                 1024);
   PTHREAD_DETACH(&pt);
-  while (tv != 2) { 
+  while (tv != 2) {
     sv = 1;
     gnunet_util_sleep(50 * cronMILLIS); /* busy waiting may not always work */
   }
@@ -67,7 +67,7 @@
   return 0;
 }
 
-static int testMutex() {  
+static int testMutex() {
   PTHREAD_T pt;
   void * unused;
   MUTEX_CREATE(&lock);
@@ -84,10 +84,10 @@
   sv = 5; /* release lockIt from while sv==0 loop,
             blocks it on lock */
   fprintf(stderr, ".");
-  
+
   if (sv != 5) {
     MUTEX_UNLOCK(&lock);
-    while (tv != 2) 
+    while (tv != 2)
       gnunet_util_sleep(50 * cronMILLIS); /* busy waiting may not always work 
*/
     MUTEX_DESTROY(&lock);
     printf("MUTEX test failed at %s:%u\n",
@@ -95,12 +95,12 @@
     return 1; /* error */
   } else {
     MUTEX_UNLOCK(&lock);
-    while (tv != 2) 
+    while (tv != 2)
       gnunet_util_sleep(50 * cronMILLIS); /* busy waiting may not always work 
*/
     PTHREAD_JOIN(&pt, &unused);
     MUTEX_DESTROY(&lock);
     return 0; /* ok */
-  } 
+  }
 }
 
 static int testRecursiveMutex() {
@@ -114,7 +114,7 @@
     MUTEX_UNLOCK(&lock);
   MUTEX_DESTROY(&lock);
   return 0; /* ok -- fails by hanging!*/
-} 
+}
 
 static void semUpDown() {
   int i;
@@ -187,7 +187,7 @@
   int cnt;
   int i;
   int j;
-  FILE * fd;  
+  FILE * fd;
   int ret;
   int si;
   int sw;
@@ -225,7 +225,7 @@
          ret = 1;
          goto END;
        }
-       fclose(fd);  
+       fclose(fd);
        if (j != i+cnt) {
          printf("IPC test failed at cnt=%d i=%d j=%d %s:%u\n",
                 cnt, i, j, __FILE__, __LINE__);
@@ -233,8 +233,8 @@
          goto END;
        } else
          fprintf(stderr, ".");
-      } 
-      REMOVE("/tmp/gnunet_ipc_xchange");     
+      }
+      REMOVE("/tmp/gnunet_ipc_xchange");
       sw = 1;
     } else {
       for (i=0;i<6;i++) {
@@ -257,7 +257,7 @@
        }
        fclose(fd);
        IPC_SEMAPHORE_UP(ipc);
-      }      
+      }
       fprintf(stderr, ".");
       sleep(2); /* give reader ample time to finish */
       sw = 0;
@@ -283,9 +283,9 @@
 
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   char c;
 
@@ -296,23 +296,23 @@
       { "config",  1, 0, 'c' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
-                     "c:L:", 
-                     long_options, 
+                     argv,
+                     "c:L:",
+                     long_options,
                      &option_index);
-    
-    if (c == -1) 
+
+    if (c == -1)
       break;  /* No more flags to process */
-    
+
     switch(c) {
     case 'L':
       FREENONNULL(setConfigurationString("GNUNET",
                                         "LOGLEVEL",
                                         GNoptarg));
       break;
-    case 'c': 
+    case 'c':
       FREENONNULL(setConfigurationString("FILES",
                                         "gnunet.conf",
                                         GNoptarg));

Modified: GNUnet/src/util/shutdown.c
===================================================================
--- GNUnet/src/util/shutdown.c  2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/shutdown.c  2005-03-20 23:54:53 UTC (rev 464)
@@ -43,7 +43,7 @@
 void run_shutdown(int signum) {
   if (shutdown_signal != NULL) {
     shutdown_active = YES;
-    SEMAPHORE_UP(shutdown_signal);  
+    SEMAPHORE_UP(shutdown_signal);
   }
 }
 
@@ -62,7 +62,7 @@
     case CTRL_LOGOFF_EVENT:
       run_shutdown(1);
   }
-  
+
   return TRUE;
 }
 #endif
@@ -87,7 +87,7 @@
 
   if (shutdown_signal != NULL)
     errexit(" initializeShutdownHandlers called twice!\n");
-  shutdown_signal = SEMAPHORE_NEW(0); 
+  shutdown_signal = SEMAPHORE_NEW(0);
   shutdown_active = NO;
 #ifndef MINGW
   sig.sa_handler = &run_shutdown;
@@ -96,7 +96,7 @@
   sig.sa_flags = SA_INTERRUPT; /* SunOS */
 #else
   sig.sa_flags = SA_RESTART;
-#endif    
+#endif
   sigaction(SIGINT,  &sig, &oldsig);
   sigaction(SIGTERM, &sig, &oldsig);
   sigaction(SIGQUIT, &sig, &oldsig);

Modified: GNUnet/src/util/shutdowntest.c
===================================================================
--- GNUnet/src/util/shutdowntest.c      2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/shutdowntest.c      2005-03-20 23:54:53 UTC (rev 464)
@@ -1,4 +1,4 @@
-/** 
+/**
  * @file test/shutdowntest.c
  * @brief testcase for util/shutdown.c
  */
@@ -20,9 +20,9 @@
 #endif
   if (testShutdown() != YES)
     return 2;
-  wait_for_shutdown(); 
+  wait_for_shutdown();
   doneShutdownHandlers();
-  
+
   /* now, test "run_shutdown" */
   initializeShutdownHandlers();
   if (testShutdown() != NO)
@@ -30,17 +30,17 @@
   run_shutdown(42);
   if (testShutdown() != YES)
     return 4;
-  wait_for_shutdown(); 
-  doneShutdownHandlers();  
+  wait_for_shutdown();
+  doneShutdownHandlers();
 
   return 0;
 }
 
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   char c;
 
@@ -50,18 +50,18 @@
       { "config",  1, 0, 'c' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
-                     "c:", 
-                     long_options, 
+                     argv,
+                     "c:",
+                     long_options,
                      &option_index);
-    
-    if (c == -1) 
+
+    if (c == -1)
       break;  /* No more flags to process */
-    
+
     switch(c) {
-    case 'c': 
+    case 'c':
       FREENONNULL(setConfigurationString("FILES",
                                         "gnunet.conf",
                                         GNoptarg));

Modified: GNUnet/src/util/state.c
===================================================================
--- GNUnet/src/util/state.c     2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/state.c     2005-03-20 23:54:53 UTC (rev 464)
@@ -53,8 +53,8 @@
   size_t n;
 
 #if STATE_DEBUG
-  LOG(LOG_DEBUG, 
-      "Database (state): %s\n", 
+  LOG(LOG_DEBUG,
+      "Database (state): %s\n",
       dir);
 #endif
   n = strlen(dir) + strlen(DIR_EXT) + 5;
@@ -80,7 +80,7 @@
                    base,
                    _("Configuration file must specify a directory"
                      " for GNUnet to store per-peer data under %s%s.\n"));
-  dbh = getDirectory(dir);  
+  dbh = getDirectory(dir);
   FREE(dir);
   GNUNET_ASSERT(dbh != NULL);
   mkdirp(dbh);
@@ -101,10 +101,10 @@
  * Read the contents of a bucket to a buffer.
  *
  * @param name the hashcode representing the entry
- * @param result the buffer to write the result to 
+ * @param result the buffer to write the result to
  *        (*result should be NULL, sufficient space is allocated)
  * @return the number of bytes read on success, -1 on failure
- */ 
+ */
 int stateReadContent(const char * name,
                     void ** result) {
   /* open file, must exist, open read only */
@@ -120,12 +120,12 @@
     return -1;
   n = strlen(dbh) + strlen(name) + 2;
   fil = MALLOC(n);
-  SNPRINTF(fil, 
+  SNPRINTF(fil,
           n,
-          "%s/%s", 
-          dbh, 
+          "%s/%s",
+          dbh,
           name);
-  fd = OPEN(fil, 
+  fd = OPEN(fil,
            O_RDONLY,
            S_IRUSR);
   if (fd == -1) {
@@ -138,10 +138,10 @@
     CLOSE(fd);
     return -1;
   }
-    
+
   *result = MALLOC(fsize);
-  size = READ(fd, 
-             *result, 
+  size = READ(fd,
+             *result,
              fsize);
   CLOSE(fd);
   if (size == -1) {
@@ -173,8 +173,8 @@
   fil = MALLOC(n);
   SNPRINTF(fil,
           n,
-          "%s/%s", 
-          dbh, 
+          "%s/%s",
+          dbh,
           name);
   fd = OPEN(fil,
            O_RDWR|O_CREAT,
@@ -185,18 +185,18 @@
     return SYSERR; /* failed! */
   }
   FREE(fil);
-  lseek(fd, 
-       0, 
+  lseek(fd,
+       0,
        SEEK_END);
-  WRITE(fd, 
-       block, 
+  WRITE(fd,
+       block,
        len);
   CLOSE(fd);
   return OK;
 }
 
 /**
- * Write content to a file. 
+ * Write content to a file.
  *
  * @param name the key for the entry
  * @param len the number of bytes in block
@@ -216,8 +216,8 @@
   fil = MALLOC(n);
   SNPRINTF(fil,
           n,
-          "%s/%s", 
-          dbh, 
+          "%s/%s",
+          dbh,
           name);
   fd = OPEN(fil,
            O_RDWR|O_CREAT,
@@ -227,8 +227,8 @@
     FREE(fil);
     return SYSERR; /* failed! */
   }
-  WRITE(fd, 
-       block, 
+  WRITE(fd,
+       block,
        len);
   if (0 != ftruncate(fd, len))
     LOG_FILE_STRERROR(LOG_WARNING, "ftruncate", fil);
@@ -239,7 +239,7 @@
 
 /**
  * Free space in the database by removing one file
- * @param name the hashcode representing the name of the file 
+ * @param name the hashcode representing the name of the file
  *        (without directory)
  */
 int stateUnlinkFromDB(const char * name) {
@@ -250,10 +250,10 @@
   GNUNET_ASSERT(handle != NULL);
   n = strlen(dbh) + strlen(name) + 2;
   fil = MALLOC(n);
-  SNPRINTF(fil, 
+  SNPRINTF(fil,
           n,
           "%s/%s",
-          dbh, 
+          dbh,
           name);
   UNLINK(fil);
   FREE(fil);

Modified: GNUnet/src/util/statetest.c
===================================================================
--- GNUnet/src/util/statetest.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/statetest.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -8,9 +8,9 @@
 #include "platform.h"
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   char c;
 
@@ -20,18 +20,18 @@
       { "config",  1, 0, 'c' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
-                     "c:", 
-                     long_options, 
+                     argv,
+                     "c:",
+                     long_options,
                      &option_index);
-    
-    if (c == -1) 
+
+    if (c == -1)
       break;  /* No more flags to process */
-    
+
     switch(c) {
-    case 'c': 
+    case 'c':
       FREENONNULL(setConfigurationString("FILES",
                                         "gnunet.conf",
                                         GNoptarg));
@@ -47,7 +47,7 @@
 #define TH "TestHandle"
 
 int testState() {
-  char * testString = "Hello World";  
+  char * testString = "Hello World";
   char * ret;
 
   stateUnlinkFromDB(TH); /* go to defined state */

Modified: GNUnet/src/util/statuscalls.c
===================================================================
--- GNUnet/src/util/statuscalls.c       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/statuscalls.c       2005-03-20 23:54:53 UTC (rev 464)
@@ -89,7 +89,7 @@
 
 /**
  * Increment the number of bytes sent.  Transports should use this
- * so that statuscalls module can measure gnunet traffic usage between 
+ * so that statuscalls module can measure gnunet traffic usage between
  * calls to /proc.
  *
  * Note: the caller doesn't know what interface it is attached to,
@@ -128,7 +128,7 @@
   int start;
 
   MUTEX_LOCK(&statusMutex);
-  interfaces 
+  interfaces
     = getConfigurationString("LOAD",
                             "INTERFACES");
   ifcs = interfaces;
@@ -143,22 +143,22 @@
     return;
   }
 
-  /* The string containing the interfaces is formatted in the following way: 
-   * each comma is replaced by '\0' and the pointers to the beginning of every 
+  /* The string containing the interfaces is formatted in the following way:
+   * each comma is replaced by '\0' and the pointers to the beginning of every
    * interface are stored
    */
   numInterfaces = 0;
   start = YES;
   while (1) {
     if (*interfaces == '\0') {
-      if (start == NO) 
-       numInterfaces++;      
+      if (start == NO)
+       numInterfaces++;
       break;
     }
-    if ( ((*interfaces>='a') && (*interfaces<='z')) || 
-        ((*interfaces>='A') && (*interfaces<='Z')) || 
+    if ( ((*interfaces>='a') && (*interfaces<='z')) ||
+        ((*interfaces>='A') && (*interfaces<='Z')) ||
         ((*interfaces>='0') && (*interfaces<='9')) ) {
-      start = NO;         
+      start = NO;
     } else {
       if (*interfaces != ',')
        errexit(_("Interfaces string (%s) in configuration section '%s' under 
'%s' is malformed.\n"),
@@ -196,15 +196,15 @@
   start = YES;
   while (1) {
     if (*interfaces=='\0') {
-      if (start == NO) 
-       numInterfaces++;      
+      if (start == NO)
+       numInterfaces++;
       break;
     }
-    if ( ((*interfaces>='a') && (*interfaces<='z')) || 
-        ((*interfaces>='A') && (*interfaces<='Z')) || 
+    if ( ((*interfaces>='a') && (*interfaces<='z')) ||
+        ((*interfaces>='A') && (*interfaces<='Z')) ||
         ((*interfaces>='0') && (*interfaces<='9')) ) {
       if (start == YES) {
-       start = NO;   
+       start = NO;
        interfacePtrs[numInterfaces] = interfaces;      
       }
     } else {
@@ -216,17 +216,17 @@
     }
     interfaces++;
   }
-  
-  useBasicMethod 
+
+  useBasicMethod
     = testConfigurationString("LOAD",
                              "BASICLIMITING",
                              "YES");
-  maxNetDownBPS 
+  maxNetDownBPS
     = getConfigurationInt("LOAD",
                          "MAXNETDOWNBPSTOTAL");
   if (maxNetDownBPS == 0)
     maxNetDownBPS = 50000;
-  maxNetUpBPS 
+  maxNetUpBPS
     = getConfigurationInt("LOAD",
                          "MAXNETUPBPSTOTAL");
   if (maxNetUpBPS == 0)
@@ -236,7 +236,7 @@
                          "MAXCPULOAD");
   if (maxCPULoad == 0)
     maxCPULoad = 100;
-  MUTEX_UNLOCK(&statusMutex);  
+  MUTEX_UNLOCK(&statusMutex);
 }
 
 #ifdef LINUX
@@ -250,13 +250,13 @@
   cron_t now, elapsedTime;
   double upUsage;
   double etc;
-  
+
   MUTEX_LOCK(&statusMutex);
-  /* If called less than 1 seconds ago, calc average 
+  /* If called less than 1 seconds ago, calc average
      between avg. traffic of last second and the additional
      gained traffic.  If more than 1 second between calls,
      set the avg bytes/sec as the usage of last second. */
-  cronTime(&now);  
+  cronTime(&now);
   elapsedTime = now - lastnettimeUp;
   etc = (double) elapsedTime / (double) cronSECONDS;
   if (elapsedTime < cronSECONDS) {
@@ -280,17 +280,17 @@
   cron_t now, elapsedTime;
   double downUsage;
   double etc;
-  
+
   MUTEX_LOCK(&statusMutex);
-  /* If called less than 1 seconds ago, calc average 
+  /* If called less than 1 seconds ago, calc average
      between avg. traffic of last second and the additional
      gained traffic. If more than 1 second between calls,
      set the avg bytes/sec as the usage of last second. */
-  cronTime(&now);  
+  cronTime(&now);
   elapsedTime = now - lastnettimeDown;
   etc = (double) elapsedTime / (double) cronSECONDS;
   if (elapsedTime < cronSECONDS) {
-    downUsage = ( ( lastNetResultDown + 
+    downUsage = ( ( lastNetResultDown +
                    ((double)globalTrafficBetweenProc.last_in * etc) )
                  / (1.0 + etc) );
   } else {
@@ -305,9 +305,9 @@
 
 /**
  * The advanced usage meter takes into account all network traffic.
- * This might be problematic on systems where the same interface 
- * can have different capabilities for different types of traffic 
- * (like support for very fast local traffic but capable of 
+ * This might be problematic on systems where the same interface
+ * can have different capabilities for different types of traffic
+ * (like support for very fast local traffic but capable of
  * handling only small-scale inet traffic).
  */
 static int networkUsageAdvancedDown() {
@@ -318,7 +318,7 @@
   int i=0;
   int ifnum;
   cron_t now, elapsedtime;
-  
+
 #ifdef LINUX
   FILE * proc_net_dev;
   char * data;
@@ -338,7 +338,7 @@
 
   /* If we checked /proc less than 2 seconds ago, don't do
      it again, but add internal gnunet traffic increments */
-  cronTime(&now);  
+  cronTime(&now);
   elapsedtime = now - lastnettimeDown;
   if (elapsedtime == 0) {
     MUTEX_UNLOCK(&statusMutex);
@@ -358,18 +358,18 @@
     /* weigh last global measurement and gnunetd load,
        with 100% global measurement at first and 50/50 mix
        just before we take the next measurement */
-    ret = ( (2 * cronSECONDS * lastNetResultDown + elapsedtime * gnunetLOAD) / 
+    ret = ( (2 * cronSECONDS * lastNetResultDown + elapsedtime * gnunetLOAD) /
            (2 * cronSECONDS + elapsedtime));
     MUTEX_UNLOCK(&statusMutex);
     return ret;
-  } 
+  }
 
   globalTrafficBetweenProc.last_in = 0;
-  lastnettimeDown = now;  
+  lastnettimeDown = now;
 
   /* ok, full program... */
   rxdiff = 0;
-  
+
 #ifdef LINUX
   proc_net_dev = fopen(PROC_NET_DEV, "r");
   /* Try to open the file*/
@@ -381,12 +381,12 @@
   }
   ifnum = 0;
   /* Parse the line matching the interface ('eth0') */
-  while ( (!feof(proc_net_dev)) && 
-         ( ifnum < numInterfaces) ) {    
+  while ( (!feof(proc_net_dev)) &&
+         ( ifnum < numInterfaces) ) {
     fgets(line,
-         MAX_PROC_LINE, 
+         MAX_PROC_LINE,
          proc_net_dev);
-    
+
     for (i=0;i<numInterfaces;i++) {
       if (NULL != strstr(line, interfacePtrs[i]) ) {
        data = (char*)strchr(line, ':');
@@ -394,7 +394,7 @@
        if (sscanf(data,
                   "%llu %*s %*s %*s %*s %*s %*s %*s %llu",
                  &rxnew, &txnew) != 2) {
-         fclose(proc_net_dev);  
+         fclose(proc_net_dev); 
          errexit(_("Failed to parse interface data from '%s' at %s:%d.\n"),
                  PROC_NET_DEV, __FILE__, __LINE__);
        }
@@ -418,16 +418,16 @@
       PMIB_IFTABLE pTable;
       DWORD dwIfIdx;
       int found = 0;
-      
+
       EnumNICs(&pTable, NULL);
-      
+
       for(dwIfIdx=0; dwIfIdx < pTable->dwNumEntries; dwIfIdx++) {
         unsigned long long l;
         BYTE bPhysAddr[MAXLEN_PHYSADDR];
-  
+
         l = _atoi64(interfacePtrs[i]);
-  
-        memset(bPhysAddr, 0, MAXLEN_PHYSADDR);      
+
+        memset(bPhysAddr, 0, MAXLEN_PHYSADDR);
         memcpy(bPhysAddr,
           pTable->table[dwIfIdx].bPhysAddr,
           pTable->table[dwIfIdx].dwPhysAddrLen);
@@ -437,15 +437,15 @@
           break;
         }
       }
-      
+
       if (found)
         rxnew = pTable->table[dwIfIdx].dwInOctets;
       else
         rxnew = last_net_results[ifnum].last_in;
-      
+
       rxdiff += rxnew - last_net_results[ifnum].last_in;
       last_net_results[ifnum].last_in = rxnew;
-      
+
       GlobalFree(pTable);
     }
   }
@@ -453,7 +453,7 @@
   {
     /* Win 95 */
     int iLine = 0;
-    
+
     if ( ( command = popen("netstat -e", "rt") ) == NULL )
     {
       LOG_FILE_STRERROR(LOG_ERROR, "popen", "netstat -e");
@@ -468,8 +468,8 @@
       {
         char szDummy[100];
         sscanf("%s%i%i", szDummy, &rxnew, &txnew);
-             rxdiff += rxnew - last_net_results[0].last_in;      
-             last_net_results[0].last_in = rxnew;        
+             rxdiff += rxnew - last_net_results[0].last_in;    
+             last_net_results[0].last_in = rxnew;
       }
       iLine++;
     }
@@ -487,14 +487,14 @@
     return -1;
   }
   ifnum = 0;
-  while ( (!feof(command)) && 
+  while ( (!feof(command)) &&
          (ifnum < numInterfaces ) ) {
-    fgets(line, 
-         MAX_PROC_LINE, 
+    fgets(line,
+         MAX_PROC_LINE,
          command);
     for (i=0; i < numInterfaces; i++) {
       if ( NULL != strstr(line, interfacePtrs[i]) ) {
-       if(sscanf(line, "%*s %*s %*s %*s %llu %*s %llu %*s %*s", 
+       if(sscanf(line, "%*s %*s %*s %*s %llu %*s %llu %*s %*s",
                  &rxnew, &txnew) != 2 ) {
          pclose(command);
          errexit(_("Failed to parse interface data '%s' output at %s:%d.\n"),
@@ -513,20 +513,20 @@
   } /* while: for all lines in proc */
   pclose(command);
 #endif
-  
-  lastNetResultDown 
+
+  lastNetResultDown
     = (100 * rxdiff * cronSECONDS) / (elapsedtime * maxNetDownBPS);
        
   MUTEX_UNLOCK(&statusMutex);
-  return (int) lastNetResultDown;  
+  return (int) lastNetResultDown;
 }
 
 
 /**
  * The advanced usage meter takes into account all network traffic.
- * This might be problematic on systems where the same interface 
- * can have different capabilities for different types of traffic 
- * (like support for very fast local traffic but capable of 
+ * This might be problematic on systems where the same interface
+ * can have different capabilities for different types of traffic
+ * (like support for very fast local traffic but capable of
  * handling only small-scale inet traffic).
  */
 static int networkUsageAdvancedUp() {
@@ -537,7 +537,7 @@
   int i=0;
   int ifnum;
   cron_t now, elapsedtime;
-  
+
 #ifdef LINUX
   FILE * proc_net_dev;
   char * data;
@@ -557,7 +557,7 @@
 
   /* If we checked /proc less than 2 seconds ago, don't do
      it again, but add internal gnunet traffic increments */
-  cronTime(&now);  
+  cronTime(&now);
   elapsedtime = now - lastnettimeUp;
   if (elapsedtime == 0) {
     MUTEX_UNLOCK(&statusMutex);
@@ -578,18 +578,18 @@
     /* weigh last global measurement and gnunetd load,
        with 100% global measurement at first and 50/50 mix
        just before we take the next measurement */
-    ret = ( (2 * cronSECONDS * lastNetResultUp + elapsedtime * gnunetLOAD) / 
+    ret = ( (2 * cronSECONDS * lastNetResultUp + elapsedtime * gnunetLOAD) /
            (2 * cronSECONDS + elapsedtime));
     MUTEX_UNLOCK(&statusMutex);
     return ret;
   }
 
-  globalTrafficBetweenProc.last_out = 0;  
+  globalTrafficBetweenProc.last_out = 0;
   lastnettimeUp = now;
 
   /* ok, full program... */
   txdiff = 0;
-  
+
 #ifdef LINUX
   proc_net_dev = fopen(PROC_NET_DEV, "r");
   /* Try to open the file*/
@@ -601,12 +601,12 @@
   }
   ifnum = 0;
   /* Parse the line matching the interface ('eth0') */
-  while ( (!feof(proc_net_dev)) && 
-         ( ifnum < numInterfaces) ) {    
+  while ( (!feof(proc_net_dev)) &&
+         ( ifnum < numInterfaces) ) {
     fgets(line,
-         MAX_PROC_LINE, 
+         MAX_PROC_LINE,
          proc_net_dev);
-    
+
     for (i=0;i<numInterfaces;i++) {
       if (NULL != strstr(line, interfacePtrs[i]) ) {
        data = (char*)strchr(line, ':');
@@ -638,16 +638,16 @@
       PMIB_IFTABLE pTable;
       DWORD dwIfIdx;
       int found = 0;
-      
+
       EnumNICs(&pTable, NULL);
-      
+
       for(dwIfIdx=0; dwIfIdx < pTable->dwNumEntries; dwIfIdx++) {
         unsigned long long l;
         BYTE bPhysAddr[MAXLEN_PHYSADDR];
-  
+
         l = _atoi64(interfacePtrs[i]);
-  
-        memset(bPhysAddr, 0, MAXLEN_PHYSADDR);      
+
+        memset(bPhysAddr, 0, MAXLEN_PHYSADDR);
         memcpy(bPhysAddr,
           pTable->table[dwIfIdx].bPhysAddr,
           pTable->table[dwIfIdx].dwPhysAddrLen);
@@ -657,15 +657,15 @@
           break;
         }
       }
-      
+
       if (found)
         txnew = pTable->table[dwIfIdx].dwOutOctets;
       else
         txnew = last_net_results[ifnum].last_out;
-      
-      txdiff += txnew - last_net_results[ifnum].last_out;   
+
+      txdiff += txnew - last_net_results[ifnum].last_out;
       last_net_results[ifnum].last_out = txnew;
-      
+
       GlobalFree(pTable);
     }
   }
@@ -673,7 +673,7 @@
   {
     /* Win 95 */
     int iLine = 0;
-    
+
     if ((command = popen("netstat -e", "rt")) == NULL)
     {
       LOG_FILE_STRERROR(LOG_ERROR, "popen", "netstat -e");
@@ -688,8 +688,8 @@
       {
         char szDummy[100];
         sscanf("%s%i%i", szDummy, &rxnew, &txnew);
-             txdiff += txnew - last_net_results[0].last_out;     
-             last_net_results[0].last_out = txnew;        
+             txdiff += txnew - last_net_results[0].last_out;   
+             last_net_results[0].last_out = txnew;
       }
       iLine++;
     }
@@ -707,14 +707,14 @@
     return -1;
   }
   ifnum = 0;
-  while ( (!feof(command)) && 
+  while ( (!feof(command)) &&
          (ifnum < numInterfaces ) ) {
-    fgets(line, 
-         MAX_PROC_LINE, 
+    fgets(line,
+         MAX_PROC_LINE,
          command);
     for (i=0; i < numInterfaces; i++) {
       if ( NULL != strstr(line, interfacePtrs[i]) ) {
-       if(sscanf(line, "%*s %*s %*s %*s %llu %*s %llu %*s %*s", 
+       if(sscanf(line, "%*s %*s %*s %*s %llu %*s %llu %*s %*s",
                  &rxnew, &txnew) != 2 ) {
          pclose(command);
          errexit(" reading interface data using netstat\n");
@@ -731,12 +731,12 @@
   } /* while: for all lines in proc */
   pclose(command);
 #endif
-  
-  lastNetResultUp 
+
+  lastNetResultUp
     = (100 * txdiff * cronSECONDS) / (elapsedtime * maxNetUpBPS);
        
   MUTEX_UNLOCK(&statusMutex);
-  return (int) lastNetResultUp;  
+  return (int) lastNetResultUp;
 }
 
 /**
@@ -774,8 +774,8 @@
 
 /**
  * The following routine returns a number between 0-100 (can be larger than 100
- * if the load is > 1) which indicates the percentage CPU usage.  
- * 
+ * if the load is > 1) which indicates the percentage CPU usage.
+ *
  * Before its first invocation the method initStatusCalls() must be called.
  * If there is an error the method returns -1
  */
@@ -790,7 +790,7 @@
   if (initialized_ == NO)
     return -1;
   MUTEX_LOCK(&statusMutex);
-  cronTime(&now);  
+  cronTime(&now);
   elapsedtime = now - lastcputime;
   if ( (elapsedtime < 10 * cronSECONDS) &&
        (lastcpuresult != -1) ) {
@@ -819,7 +819,7 @@
       fclose(proc_stat);
       proc_stat = NULL;
     } else {
-      if (sscanf(line, "%*s %i %i %i %i", 
+      if (sscanf(line, "%*s %i %i %i %i",
                 &user_read, &system_read, &nice_read,
                 &idle_read) != 4) {
        fclose(proc_stat);
@@ -853,7 +853,7 @@
        last_cpu_results[3] = idle_read;
        lastcpuresult = ret;
        MUTEX_UNLOCK(&statusMutex);
-       return ret;      
+       return ret;
       }
     }
   }
@@ -874,7 +874,7 @@
     static long long last_totalcount = 0;
     long long deltaidle;
     long long deltatotal;
-    
+
     if (kstat_once == 0) {
       kc = kstat_open();
       if (kc == NULL)
@@ -882,26 +882,26 @@
     } else {
       kc = NULL;
     }
-    if (kc == NULL) 
+    if (kc == NULL)
       goto ABORT_KSTAT;
-    
+
     idlecount = 0;
     totalcount = 0;
     for (khelper = kc->kc_chain;
-        khelper != NULL; 
+        khelper != NULL;
         khelper = khelper->ks_next) {
       cpu_stat_t stats;
-      
+
       if (0 != strncmp(khelper->ks_name,
-                      "cpu_stat", 
+                      "cpu_stat",
                       strlen("cpu_stat")) )
        continue;
       if (khelper->ks_data_size > sizeof(cpu_stat_t))
        continue; /* better save then sorry! */
       if (-1 != kstat_read(kc, khelper, &stats)) {
-       idlecount 
+       idlecount
          += stats.cpu_sysinfo.cpu[CPU_IDLE];
-       totalcount 
+       totalcount
          += stats.cpu_sysinfo.cpu[CPU_IDLE] +
          stats.cpu_sysinfo.cpu[CPU_USER] +
          stats.cpu_sysinfo.cpu[CPU_KERNEL] +
@@ -923,7 +923,7 @@
     MUTEX_UNLOCK(&statusMutex);
     lastcpuresult = (int) (100 * deltaidle / deltatotal);
     return lastcpuresult;
-    
+
   ABORT_KSTAT:
     kstat_once = 1; /* failed, don't try again */
   }
@@ -966,17 +966,17 @@
     {
       double dKernel, dIdle, dUser, dDiffKernel, dDiffIdle, dDiffUser;
       static double dLastKernel = 0, dLastIdle = 0, dLastUser = 0;
-      
+
       dKernel = Li2Double(theInfo.KernelTime);
       dIdle = Li2Double(theInfo.IdleTime);
       dUser = Li2Double(theInfo.UserTime);
-      
+
       if (dLastIdle != 0)
       {
         dDiffKernel = dKernel - dLastKernel;
         dDiffIdle = dIdle - dLastIdle;
         dDiffUser = dUser - dLastUser;
-    
+
         /* FIXME MINGW: Multi-processor? */
         lastcpuresult = 100.0 - (dDiffIdle / (dDiffKernel + dDiffUser)) * 
100.0;
       }
@@ -1020,7 +1020,7 @@
            once = 1;
            LOG(LOG_ERROR,
                _("Cannot query the CPU usage (Win 9x)\n"));
-         }      
+         }
     }
 
     RegOpenKeyEx(HKEY_DYN_DATA, "PerfStats\\StartStat", 0, KEY_ALL_ACCESS,
@@ -1030,7 +1030,7 @@
     RegQueryValueEx(hKey, "KERNEL\\CPUUsage", NULL, &dwType, (LPBYTE) &dwDummy,
                     &dwDataSize);
     RegCloseKey(hKey);
-    
+
     /* Get CPU usage */
     RegOpenKeyEx(HKEY_DYN_DATA, "PerfStats\\StatData", 0, KEY_ALL_ACCESS,
                  &hKey);
@@ -1038,7 +1038,7 @@
     RegQueryValueEx(hKey, "KERNEL\\CPUUsage", NULL, &dwType,
                     (LPBYTE) &lastcpuresult, &dwDataSize);
     RegCloseKey(hKey);
-    
+
     /* Stop query */
     RegOpenKeyEx(HKEY_DYN_DATA, "PerfStats\\StopStat", 0, KEY_ALL_ACCESS,
                  &hKey);
@@ -1048,15 +1048,15 @@
     RegQueryValueEx(hKey, "KERNEL\\CPUUsage", NULL, &dwType, (LPBYTE)&dwDummy,
                     &dwDataSize);
     RegCloseKey(hKey);
-    
+
     MUTEX_UNLOCK(&statusMutex);
     return lastcpuresult;
   }
 #endif
 
-  /* loadaverage not defined and no platform 
-     specific alternative defined 
-     => default: error 
+  /* loadaverage not defined and no platform
+     specific alternative defined
+     => default: error
   */
   lastcpuresult = -1;
   MUTEX_UNLOCK(&statusMutex);
@@ -1091,7 +1091,7 @@
 
   ret = (ret + 7 * lastRet)/8;
   lastRet = ret;
- 
+
   return ret;
 }
 
@@ -1112,9 +1112,9 @@
   ret = networkUsageDown();
   if (ret == -1) /*  in the case of error, we do NOT go to 100%
                    since that would render GNUnet useless on
-                   systems where networkUsageUp is not supported */    
+                   systems where networkUsageUp is not supported */
     return -1;
- 
+
   cronTime(&now);
   if (now - lastCall < 250*cronMILLIS) {
     /* use smoothing, but do NOT update lastRet at frequencies higher
@@ -1123,9 +1123,9 @@
     return (ret + 7 * lastRet)/8;
   }
   lastCall = now;
-   
+
   ret = (ret + 7 * lastRet)/8;
-  lastRet = ret;  
+  lastRet = ret;
   return ret;
 }
 
@@ -1143,7 +1143,7 @@
   if (initialized_ == NO)
     return -1;
 
-  ret = (100 * cpuUsage()) / maxCPULoad;  
+  ret = (100 * cpuUsage()) / maxCPULoad;
 
   cronTime(&now);
   if (now - lastCall < 250*cronMILLIS) {
@@ -1157,7 +1157,7 @@
   /* for CPU, we don't do the 'fast increase' since CPU is much
      more jitterish to begin with */
   lastRet = (ret + 7 * lastRet)/8;
-  
+
   return lastRet;
 }
 
@@ -1170,7 +1170,7 @@
   initialized_ = YES;
 #ifdef LINUX
   proc_stat = fopen("/proc/stat", "r");
-  if (NULL == proc_stat) 
+  if (NULL == proc_stat)
     LOG_FILE_STRERROR(LOG_ERROR, "fopen", "/proc/stat");
 #endif
   MUTEX_CREATE_RECURSIVE(&statusMutex);
@@ -1179,13 +1179,13 @@
   last_net_results = NULL;
   globalTrafficBetweenProc.last_in = 0;
   globalTrafficBetweenProc.last_out = 0;
-  cronTime(&lastnettimeUp);  
-  cronTime(&lastnettimeDown);  
+  cronTime(&lastnettimeUp);
+  cronTime(&lastnettimeDown);
   registerConfigurationUpdateCallback(&resetStatusCalls);
   resetStatusCalls();
-  networkUsageUp(); 
-  networkUsageDown(); 
-  cpuUsage();  
+  networkUsageUp();
+  networkUsageDown();
+  cpuUsage();
   addCronJob(&cronLoadUpdate,
             10 * cronSECONDS,
             10 * cronSECONDS,

Modified: GNUnet/src/util/statuscallstest.c
===================================================================
--- GNUnet/src/util/statuscallstest.c   2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/statuscallstest.c   2005-03-20 23:54:53 UTC (rev 464)
@@ -1,4 +1,4 @@
-/** 
+/**
  * @file util/statuscallstest.c
  * @brief testcase for util/statuscalls.c
  */
@@ -34,9 +34,9 @@
 
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   char c;
 
@@ -55,18 +55,18 @@
       { "config",  1, 0, 'c' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
-                     "c:", 
-                     long_options, 
+                     argv,
+                     "c:",
+                     long_options,
                      &option_index);
-    
-    if (c == -1) 
+
+    if (c == -1)
       break;  /* No more flags to process*/
-    
+
     switch(c) {
-    case 'c': 
+    case 'c':
       FREENONNULL(setConfigurationString("FILES",
                                         "gnunet.conf",
                                         GNoptarg));
@@ -90,11 +90,11 @@
       return -1;
     }
     if (networkUsageUp() == -1) {
-      printf("networkUsageUp == -1\n");    
+      printf("networkUsageUp == -1\n");
       return -1;
     }
     if (networkUsageDown() == -1) {
-      printf("networkUsageDown == -1\n");    
+      printf("networkUsageDown == -1\n");
       return -1;
     }
     sleep(1);
@@ -108,11 +108,11 @@
   ret = cpuUsage();
   while (start + 12 * cronSECONDS > cronTime(NULL))
     sqrt(245.2523); /* do some processing to drive load up */
-  if (ret > cpuUsage()) 
+  if (ret > cpuUsage())
     printf("busy loop decreased CPU load: %d < %d.\n",
           ret,
           cpuUsage());
-  
+
   /* make sure we don't leak open files... */
   for (i=0;i<10000;i++) {
     if (cpuUsage() == -1)

Modified: GNUnet/src/util/storage.c
===================================================================
--- GNUnet/src/util/storage.c   2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/storage.c   2005-03-20 23:54:53 UTC (rev 464)
@@ -67,16 +67,16 @@
 static void getSizeRec(const char * filename,
                       const char * dirname,
                       unsigned long long * size) {
-  struct stat buf;  
+  struct stat buf;
   char * fn;
-  
+
   if (filename == NULL)
     return;
   if (dirname != NULL) {
     fn = MALLOC(strlen(filename) + strlen(dirname) + 2);
     fn[0] = '\0';
     if (strlen(dirname) > 0) {
-      strcat(fn, dirname);      
+      strcat(fn, dirname);
       if (dirname[strlen(dirname)-1] != DIR_SEPARATOR)
        strcat(fn, "/"); /* add tailing / if needed */
     }
@@ -103,7 +103,7 @@
     scanDirectory(fn,
                  (DirectoryEntryCallback)&getSizeRec,
                  size);
-  }  
+  }
   FREE(fn);
 }
 
@@ -111,16 +111,16 @@
 static void getSizeWithoutSymlinksRec(const char * filename,
                                      const char * dirname,
                                      unsigned long long * size) {
-  struct stat buf;  
+  struct stat buf;
   char * fn;
-  
+
   if (filename == NULL)
     return;
   if (dirname != NULL) {
     fn = MALLOC(strlen(filename) + strlen(dirname) + 2);
     fn[0] = '\0';
     if (strlen(dirname) > 0) {
-      strcat(fn, dirname);      
+      strcat(fn, dirname);
       if (dirname[strlen(dirname)-1] != DIR_SEPARATOR)
        strcat(fn, "/"); /* add tailing / if needed */
     }
@@ -148,7 +148,7 @@
     scanDirectory(fn,
                  (DirectoryEntryCallback)&getSizeRec,
                  size);
-  }  
+  }
   FREE(fn);
 }
 
@@ -172,16 +172,16 @@
 #elif MINGW
   DWORD dwDummy, dwBlocks;
   char szDrive[4];
-  
+
   memcpy(szDrive, part, 3);
-  szDrive[3] = 0; 
+  szDrive[3] = 0;
   if(!GetDiskFreeSpace(szDrive, &dwDummy, &dwDummy, &dwBlocks, &dwDummy))
   {
     LOG(LOG_ERROR,
         _("'%s' failed for drive %s: %u\n"),
        "GetDiskFreeSpace",
         szDrive, GetLastError());
-        
+
     return -1;
   }
   else
@@ -192,7 +192,7 @@
   struct statfs s;
   if (0 == statfs(part, &s)) {
     return s.f_bavail;
-  } else {    
+  } else {
     LOG_STRERROR(LOG_ERROR, "statfs");
     return -1;
   }
@@ -213,7 +213,7 @@
 }
 
 /**
- * Get the size of the file (or directory) without 
+ * Get the size of the file (or directory) without
  * counting symlinks.
  * FIXME: Currently this function does not return errors
  */
@@ -278,7 +278,7 @@
        _("'%s' is not a regular file.\n"),
        fil);
     return 0;
-  }  
+  }
   if (ACCESS(fil, R_OK) < 0 ) {
     LOG_FILE_STRERROR(LOG_WARNING, "access", fil);
     return 0;
@@ -288,9 +288,9 @@
 
 /**
  * Complete filename (a la shell) from abbrevition.
- * @param fil the name of the file, may contain ~/ or 
+ * @param fil the name of the file, may contain ~/ or
  *        be relative to the current directory
- * @returns the full file name, 
+ * @returns the full file name,
  *          NULL is returned on error
  */
 char * expandFileName(const char * fil) {
@@ -322,7 +322,7 @@
     /* do not copy '~' */
     fil_ptr = fil + 1;
 
-       /* skip over dir seperator to be consistent */    
+       /* skip over dir seperator to be consistent */
     if (fil_ptr[0] == DIR_SEPARATOR) {
        fil_ptr++;
     }
@@ -349,7 +349,7 @@
     return NULL;
   }
   /* is the path relative? */
-  if ((strncmp(buffer + 1, ":\\", 2) != 0) && 
+  if ((strncmp(buffer + 1, ":\\", 2) != 0) &&
       (strncmp(buffer, "\\\\", 2) != 0))
   {
     char szCurDir[MAX_PATH + 1];
@@ -357,7 +357,7 @@
     if (lRet + strlen(fn) + 1 > (MAX_PATH + 1))
     {
       SetErrnoFromWinError(ERROR_BUFFER_OVERFLOW);
-      
+
       return NULL;
     }
     SNPRINTF(fn,
@@ -398,7 +398,7 @@
       if (rdir[pos] == '\\')
       {
         pos ++;
-        
+
         break;
       }
       pos ++;
@@ -410,28 +410,28 @@
   }
 #endif
   while (pos <= len) {
-    if ( (rdir[pos] == DIR_SEPARATOR) || 
+    if ( (rdir[pos] == DIR_SEPARATOR) ||
         (pos == len) ) {
       rdir[pos] = '\0';
       if (! isDirectory(rdir))
 #ifndef MINGW
        if (0 != mkdir(rdir,
-                      S_IRUSR | S_IWUSR | 
-                      S_IXUSR | S_IRGRP | 
-                      S_IXGRP | S_IROTH | 
+                      S_IRUSR | S_IWUSR |
+                      S_IXUSR | S_IRGRP |
+                      S_IXGRP | S_IROTH |
                       S_IXOTH)) { /* 755 */
 #else
-       if (0 != mkdir(rdir)) {    
+       if (0 != mkdir(rdir)) {
 #endif
          if (errno != EEXIST) {
            LOG_FILE_STRERROR(LOG_ERROR, "mkdir", rdir);
            ret = SYSERR;
          }
        }
-      rdir[pos] = DIR_SEPARATOR;       
-    }      
+      rdir[pos] = DIR_SEPARATOR;
+    }
     pos++;
-  }   
+  }
   FREE(rdir);
   return ret;
 }
@@ -443,22 +443,22 @@
  * @param len the maximum number of bytes to read
  * @param result the buffer to write the result to
  * @return the number of bytes read on success, -1 on failure
- */ 
+ */
 int readFile(const char * fileName,
             int  len,
             void * result) {
   /* open file, must exist, open read only */
-  int handle;  
+  int handle;
   int size;
 
   if ((fileName == NULL) || (result == NULL))
     return -1;
   handle = OPEN(fileName,O_RDONLY,S_IRUSR);
   if (handle < 0)
-    return -1; 
+    return -1;
   size = READ(handle, result, len);
   CLOSE(handle);
-  return size;  
+  return size;
 }
 
 /**
@@ -467,14 +467,14 @@
  * @param buffer the data to write
  * @param n number of bytes to write
  * @param mode permissions to set on the file
- */ 
-void writeFile(const char * fileName, 
+ */
+void writeFile(const char * fileName,
               const void * buffer,
               unsigned int n,
               const char *mode) {
   int handle;
-  /* open file, open with 600, create if not 
-     present, otherwise overwrite */  
+  /* open file, open with 600, create if not
+     present, otherwise overwrite */
   if ((fileName == NULL) || (buffer == NULL))
     return;
   handle = OPEN(fileName,
@@ -484,7 +484,7 @@
     return;
   }
   /* write the buffer take length from the beginning */
-  if (n != WRITE(handle, buffer, n)) 
+  if (n != WRITE(handle, buffer, n))
     LOG_FILE_STRERROR(LOG_WARNING, "write", fileName);
   CHMOD(fileName, atoo(mode));
   CLOSE(handle);
@@ -492,7 +492,7 @@
 
 /**
  * Build a filename from directory and filename, completing like the shell does
- * @param dir the name of the directory, may contain ~/ or other shell stuff. 
Will 
+ * @param dir the name of the directory, may contain ~/ or other shell stuff. 
Will
  *        NOT be freed!
  * @param fil the name of the file, will NOT be deallocated anymore!
  * @param result where to store the full file name (must be large enough!)
@@ -521,14 +521,14 @@
   struct dirent *finfo;
   struct stat istat;
   int count = 0;
- 
-  if (dirName == NULL) 
-    return -1; 
+
+  if (dirName == NULL)
+    return -1;
   if (0 != STAT(dirName, &istat)) {
     LOG_FILE_STRERROR(LOG_WARNING, "stat", dirName);
     return -1;
   }
-  if (!S_ISDIR(istat.st_mode)) {    
+  if (!S_ISDIR(istat.st_mode)) {
     LOG(LOG_ERROR,
        _("'%s' expected '%s' to be a directory!\n"),
        __FUNCTION__,
@@ -582,7 +582,7 @@
 int rm_minus_rf(const char * fileName) {
   if (UNLINK(fileName) == 0)
     return OK;
-  if ( (errno == EISDIR) || 
+  if ( (errno == EISDIR) ||
        /* EISDIR is not sufficient in all cases, e.g.
          sticky /tmp directory may result in EPERM on BSD.
          So we also explicitly check "isDirectory" */
@@ -618,7 +618,7 @@
       if (! CloseHandle((HANDLE) fd)) {
 #endif
        LOG(LOG_INFO,
-           _("'%s' failed at %s:%d with error: %s\n"), 
+           _("'%s' failed at %s:%d with error: %s\n"),
 #ifdef MINGW
            "CloseHandle",
 #else
@@ -663,7 +663,7 @@
             | O_LARGEFILE
 #endif
            );
-  if (in == -1) 
+  if (in == -1)
     return SYSERR;
   out = OPEN(dst, O_WRONLY | O_CREAT | O_EXCL
 #ifdef O_LARGEFILE

Modified: GNUnet/src/util/storagetest.c
===================================================================
--- GNUnet/src/util/storagetest.c       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/storagetest.c       2005-03-20 23:54:53 UTC (rev 464)
@@ -10,9 +10,9 @@
 #define TESTSTRING "Hello World\0"
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   return OK;
 }
@@ -22,15 +22,15 @@
   EncName filename;
   char tmp[100];
 
-  hash(TESTSTRING, 
+  hash(TESTSTRING,
        strlen(TESTSTRING),
        &ha);
   hash2enc(&ha, &filename);
   writeFile((char*)&filename, TESTSTRING, strlen(TESTSTRING), "644");
   tmp[readFile((char*)&filename, 100, tmp)] = '\0';
-  if (memcmp(tmp,TESTSTRING,strlen(TESTSTRING)+1) == 0) 
+  if (memcmp(tmp,TESTSTRING,strlen(TESTSTRING)+1) == 0)
     return 0;
-  else {    
+  else {
     fprintf(stderr,
            "Error in testReadWrite: *%s* != *%s* for file %s\n",
            tmp,TESTSTRING,(char*)&filename);
@@ -42,7 +42,7 @@
   int failureCount = 0;
 
   initUtil(argc, argv, &parseCommandLine);
-  failureCount += testReadWrite(); 
+  failureCount += testReadWrite();
   doneUtil();
   if (failureCount == 0)
     return 0;

Modified: GNUnet/src/util/symcipher_gcrypt.c
===================================================================
--- GNUnet/src/util/symcipher_gcrypt.c  2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/symcipher_gcrypt.c  2005-03-20 23:54:53 UTC (rev 464)
@@ -29,7 +29,7 @@
  * (since only global operations on the random pool must be locked,
  * strictly speaking).  But libgcrypt does sometimes require locking in
  * unexpected places, so the safe solution is to always lock even if it
- * is not required.  The performance impact is minimal anyway. 
+ * is not required.  The performance impact is minimal anyway.
  */
 
 #include "gnunet_util.h"
@@ -77,7 +77,7 @@
  * @param result the output parameter in which to store the encrypted result
  * @returns the size of the encrypted block, -1 for errors
  */
-int encryptBlock(const void * block, 
+int encryptBlock(const void * block,
                 unsigned short len,
                 const SESSIONKEY * sessionkey,
                 const INITVECTOR * iv,
@@ -107,27 +107,27 @@
     unlockGcrypt();
     return -1;
   }
-  rc = gcry_cipher_setkey(handle, 
-                         sessionkey, 
+  rc = gcry_cipher_setkey(handle,
+                         sessionkey,
                          SESSIONKEY_LEN);
 
-  if (rc && ((char)rc != GPG_ERR_WEAK_KEY)) {    
+  if (rc && ((char)rc != GPG_ERR_WEAK_KEY)) {
     LOG_GCRY(LOG_FAILURE, "gcry_cipher_setkey", rc);
     gcry_cipher_close(handle);
     unlockGcrypt();
     return -1;
   }
-  rc != gcry_cipher_setiv(handle, 
+  rc != gcry_cipher_setiv(handle,
                          iv,
                          sizeof(INITVECTOR));
 
-  if (rc && ((char)rc != GPG_ERR_WEAK_KEY)) {    
+  if (rc && ((char)rc != GPG_ERR_WEAK_KEY)) {
     LOG_GCRY(LOG_FAILURE, "gcry_cipher_setiv", rc);
     gcry_cipher_close(handle);
     unlockGcrypt();
     return -1;
   }
-    
+
   rc = gcry_cipher_encrypt(handle,
                           result,
                           len,
@@ -154,7 +154,7 @@
  * @param result address to store the result at
  * @return -1 on failure, size of decrypted block on success
  */
-int decryptBlock(const SESSIONKEY * sessionkey, 
+int decryptBlock(const SESSIONKEY * sessionkey,
                 const void * block,
                 unsigned short size,
                 const INITVECTOR * iv,
@@ -178,33 +178,33 @@
   rc = gcry_cipher_open(&handle,
                        GCRY_CIPHER_AES256,
                        GCRY_CIPHER_MODE_CFB,
-                       0);  
+                       0);
   if (rc) {
     LOG_GCRY(LOG_FAILURE, "gcry_cipher_open", rc);
     unlockGcrypt();
     return -1;
   }
-  rc = gcry_cipher_setkey(handle, 
-                         sessionkey, 
+  rc = gcry_cipher_setkey(handle,
+                         sessionkey,
                          SESSIONKEY_LEN);
 
-  if (rc && ((char)rc != GPG_ERR_WEAK_KEY)) {    
+  if (rc && ((char)rc != GPG_ERR_WEAK_KEY)) {
     LOG_GCRY(LOG_FAILURE, "gcry_cipher_setkey", rc);
     gcry_cipher_close(handle);
     unlockGcrypt();
     return -1;
   }
-  rc = gcry_cipher_setiv(handle, 
+  rc = gcry_cipher_setiv(handle,
                         iv,
                         sizeof(INITVECTOR));
 
-  if (rc && ((char)rc != GPG_ERR_WEAK_KEY)) {    
+  if (rc && ((char)rc != GPG_ERR_WEAK_KEY)) {
     LOG_GCRY(LOG_FAILURE, "gcry_cipher_setiv", rc);
     gcry_cipher_close(handle);
     unlockGcrypt();
     return -1;
   }
-    
+
   rc = gcry_cipher_decrypt(handle,
                           result,
                           size,

Modified: GNUnet/src/util/symciphertest.c
===================================================================
--- GNUnet/src/util/symciphertest.c     2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/symciphertest.c     2005-03-20 23:54:53 UTC (rev 464)
@@ -33,7 +33,7 @@
                      size,
                      (const INITVECTOR*) INITVALUE,
                      res);
-  if (strlen(TESTSTRING)+1 
+  if (strlen(TESTSTRING)+1
       != size) {
     printf("symciphertest failed: decryptBlock returned %d\n",
          size);
@@ -49,7 +49,7 @@
 
 int main(int argc, char * argv[]) {
   int failureCount = 0;
-  
+
   GNUNET_ASSERT(strlen(INITVALUE) > sizeof(INITVECTOR));
   initLockingGcrypt();
   failureCount += testSymcipher();
@@ -61,6 +61,6 @@
     printf("%d TESTS FAILED!\n",failureCount);
     return -1;
   }
-} 
+}
 
 /* end of symciphertest.c */

Modified: GNUnet/src/util/tcp_return.c
===================================================================
--- GNUnet/src/util/tcp_return.c        2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/tcp_return.c        2005-03-20 23:54:53 UTC (rev 464)
@@ -35,7 +35,7 @@
 /**
  * Obtain a return value from a remote call from TCP.
  *
- * @param sock the TCP socket 
+ * @param sock the TCP socket
  * @param ret the return value from TCP
  * @return SYSERR on error, OK if the return value was read
  * successfully
@@ -43,10 +43,10 @@
 int readTCPResult(GNUNET_TCP_SOCKET * sock,
                  int * ret) {
   CS_RETURN_VALUE * rv;
-  
+
   rv = NULL;
   if (SYSERR == readFromSocket(sock,
-                              (CS_HEADER **) &rv)) { 
+                              (CS_HEADER **) &rv)) {
     LOG(LOG_WARNING,
        _("'%s' failed, other side closed connection.\n"),
        __FUNCTION__);
@@ -76,12 +76,12 @@
 int sendTCPResult(GNUNET_TCP_SOCKET * sock,
                  int ret) {
   CS_RETURN_VALUE rv;
-  
-  rv.header.size 
+
+  rv.header.size
     = htons(sizeof(CS_RETURN_VALUE));
-  rv.header.type 
+  rv.header.type
     = htons(CS_PROTO_RETURN_VALUE);
-  rv.return_value 
+  rv.return_value
     = htonl(ret);
   return writeToSocket(sock,
                       &rv.header);

Modified: GNUnet/src/util/tcpio.c
===================================================================
--- GNUnet/src/util/tcpio.c     2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/tcpio.c     2005-03-20 23:54:53 UTC (rev 464)
@@ -80,14 +80,14 @@
       hostname,
       port);
 #endif
-  he = GETHOSTBYNAME(hostname); 
+  he = GETHOSTBYNAME(hostname);
   if (he == NULL) {
     LOG(LOG_ERROR,
        _("Could not find IP of host '%s': %s\n"),
        hostname,
        hstrerror(h_errno));
     return SYSERR;
-  }  
+  }
   result->ip.addr = (unsigned int) ((struct in_addr*)he->h_addr)->s_addr;
   result->port = port;
   result->socket = -1; /* closed */
@@ -123,7 +123,7 @@
  * @return 1 if open, 0 if closed
  */
 int isOpenConnection(GNUNET_TCP_SOCKET * sock) {
-  return (sock->socket != -1); 
+  return (sock->socket != -1);
 }
 
 /**
@@ -149,14 +149,14 @@
 
   wasSockBlocking = isSocketBlocking(sock->socket);
   setBlocking(sock->socket, NO);
-            
+       
   soaddr.sin_family = AF_INET;
   GNUNET_ASSERT(sizeof(struct in_addr) == sizeof(sock->ip.addr));
   memcpy(&soaddr.sin_addr,
         &sock->ip.addr,
         sizeof(struct in_addr));
   soaddr.sin_port = htons(sock->port);
-  res = CONNECT(sock->socket, 
+  res = CONNECT(sock->socket,
                (struct sockaddr*)&soaddr,
                sizeof(soaddr));
   if ( (res < 0) &&
@@ -181,8 +181,8 @@
   FD_ZERO(&rset);
   FD_ZERO(&wset);
   FD_ZERO(&eset);
-  if (sock->socket < 0) 
-    return SYSERR;  
+  if (sock->socket < 0)
+    return SYSERR;
   FD_SET(sock->socket, &wset);
   timeout.tv_sec = 5;
   timeout.tv_usec = 0;
@@ -196,7 +196,7 @@
        PRIP(ntohl(*(int*)&sock->ip.addr)),
        sock->port,
        STRERROR(errno));
-    setBlocking(sock->socket, wasSockBlocking);  
+    setBlocking(sock->socket, wasSockBlocking);
     return SYSERR;
   }
   setBlocking(sock->socket, wasSockBlocking);
@@ -233,7 +233,7 @@
        MUTEX_UNLOCK(&sock->writelock);
        return SYSERR; /* can not send right now;
                          but do NOT close socket in this case! */
-      }      
+      }
       LOG_STRERROR(LOG_INFO, "send");
       closeSocketTemporarily(sock);
       MUTEX_UNLOCK(&sock->writelock);
@@ -280,7 +280,7 @@
                             const CS_HEADER * buffer) {
   int res;
   int size;
-  
+
   if (SYSERR == checkSocket(sock))
     return SYSERR;
   MUTEX_LOCK(&sock->writelock);
@@ -293,7 +293,7 @@
       if ( (errno == EWOULDBLOCK) ||
           (errno == EAGAIN) ) {
        MUTEX_UNLOCK(&sock->writelock);
-       return NO; 
+       return NO;
       }
       LOG_STRERROR(LOG_INFO, "write");
       closeSocketTemporarily(sock);
@@ -306,7 +306,7 @@
             sock->outBufLen - res);
       sock->outBufLen -= res;
       MUTEX_UNLOCK(&sock->writelock);
-      return SYSERR;      
+      return SYSERR;
     }
     /* completely send out deferred buffer, so
        we can in fact continue! */
@@ -367,7 +367,7 @@
 
   if (SYSERR == checkSocket(sock))
     return SYSERR;
-   
+
   MUTEX_LOCK(&sock->readlock);
   pos = 0;
   res = 0;
@@ -376,7 +376,7 @@
                          &size,
                          sizeof(unsigned short));
   if (pos != sizeof(unsigned short)) {
-#if DEBUG_TCPIO    
+#if DEBUG_TCPIO
     LOG_STRERROR(LOG_INFO, "recv");
 #endif
     closeSocketTemporarily(sock);
@@ -385,16 +385,16 @@
   }
   size = ntohs(size);
   if (size < sizeof(CS_HEADER)) {
-#if DEBUG_TCPIO    
+#if DEBUG_TCPIO
     LOG_STRERROR(LOG_INFO, "recv");
 #endif
     closeSocketTemporarily(sock);
     MUTEX_UNLOCK(&sock->readlock);
     return SYSERR; /* invalid header */
-  } 
+  }
 
   buf = (char*) *buffer;
-  if (buf == NULL) 
+  if (buf == NULL)
     buf = MALLOC(size);
 
   res = RECV_BLOCKING_ALL(sock->socket,
@@ -409,7 +409,7 @@
       FREE(buf);
     MUTEX_UNLOCK(&sock->readlock);
     return SYSERR;
-  }    
+  }
 #if DEBUG_TCPIO
   LOG(LOG_DEBUG,
       "Successfully received %d bytes from TCP socket.\n",
@@ -440,13 +440,13 @@
        sock->socket);
 #endif
     sock->socket = -1;
-    if (0 != SHUTDOWN(i, SHUT_RDWR)) 
+    if (0 != SHUTDOWN(i, SHUT_RDWR))
       LOG_STRERROR(LOG_DEBUG, "shutdown");
     CLOSE(i);
   }
   sock->outBufLen = 0;
   FREENONNULL(sock->outBufPending);
-  sock->outBufPending = NULL;  
+  sock->outBufPending = NULL;
 }
 
 /**

Modified: GNUnet/src/util/tcpiotest.c
===================================================================
--- GNUnet/src/util/tcpiotest.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/tcpiotest.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -12,17 +12,17 @@
   struct sockaddr_in serverAddr;
   const int on = 1;
 
-  listenerPort = getGNUnetPort(); 
+  listenerPort = getGNUnetPort();
   /* create the socket */
   while ( (listenerFD = SOCKET(PF_INET, SOCK_STREAM, 0)) < 0) {
-    LOG(LOG_ERROR, 
+    LOG(LOG_ERROR,
        "ERROR opening socket (%s).  "
        "No client service started.  "
        "Trying again in 30 seconds.\n",
        STRERROR(errno));
     sleep(30);
   }
-  
+
   /* fill in the inet address structure */
   memset((char *) &serverAddr,
         0,
@@ -30,28 +30,28 @@
   serverAddr.sin_family = AF_INET;
   serverAddr.sin_addr.s_addr=htonl(INADDR_ANY);
   serverAddr.sin_port=htons(listenerPort);
- 
-  if ( SETSOCKOPT(listenerFD, 
-                 SOL_SOCKET, 
-                 SO_REUSEADDR, 
+
+  if ( SETSOCKOPT(listenerFD,
+                 SOL_SOCKET,
+                 SO_REUSEADDR,
                  &on, sizeof(on)) < 0 )
     perror("setsockopt");
 
   /* bind the socket */
-  if (BIND (listenerFD, 
+  if (BIND (listenerFD,
           (struct sockaddr *) &serverAddr,
-           sizeof(serverAddr)) < 0) {    
-    LOG(LOG_ERROR, 
+           sizeof(serverAddr)) < 0) {
+    LOG(LOG_ERROR,
        "ERROR (%s) binding the TCP listener to port %d. "
        "Test failed.  Is gnunetd running?\n",
        STRERROR(errno),
        listenerPort);
     return -1;
   }
-  
+
   /* start listening for new connections */
   if (0 != LISTEN(listenerFD, 5)) {
-    LOG(LOG_ERROR, 
+    LOG(LOG_ERROR,
        " listen failed: %s\n",
        STRERROR(errno));
     return -1;
@@ -68,10 +68,10 @@
   while (incomingFD < 0) {
     lenOfIncomingAddr = sizeof(clientAddr);
     incomingFD = ACCEPT(serverSocket,
-                       (struct sockaddr *)&clientAddr, 
+                       (struct sockaddr *)&clientAddr,
                        &lenOfIncomingAddr);
     if (incomingFD < 0) {
-      LOG(LOG_ERROR, 
+      LOG(LOG_ERROR,
          "ERROR accepting new connection (%s).\n",
          STRERROR(errno));
       continue;
@@ -81,9 +81,9 @@
 }
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   char c;
 
@@ -93,18 +93,18 @@
       { "config",  1, 0, 'c' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
-                     "c:", 
-                     long_options, 
+                     argv,
+                     "c:",
+                     long_options,
                      &option_index);
-    
-    if (c == -1) 
+
+    if (c == -1)
       break;  /* No more flags to process */
-    
+
     switch(c) {
-    case 'c': 
+    case 'c':
       FREENONNULL(setConfigurationString("FILES",
                                         "gnunet.conf",
                                         GNoptarg));
@@ -130,13 +130,13 @@
   hdr = MALLOC(1024);
   for (i=0;i<1024-sizeof(CS_HEADER);i+=7) {
     fprintf(stderr, ".");
-    for (j=0;j<i;j++) 
-      ((char*)&hdr[1])[j] = (char)i+j;      
+    for (j=0;j<i;j++)
+      ((char*)&hdr[1])[j] = (char)i+j;
     hdr->size = htons(i+sizeof(CS_HEADER));
     hdr->type = 0;
     if (OK != writeToSocket(a, hdr)) {
       FREE(hdr);
-      return 1; 
+      return 1;
     }
     buf = NULL;
     if (OK != readFromSocket(b, &buf)) {
@@ -163,9 +163,9 @@
 
   hdr = MALLOC(1024);
   for (i=0;i<1024-sizeof(CS_HEADER);i+=11)
-    ((char*)&hdr[1])[i] = (char)i;      
+    ((char*)&hdr[1])[i] = (char)i;
   hdr->size = htons(64+sizeof(CS_HEADER));
-  hdr->type = 0;  
+  hdr->type = 0;
   while (OK == writeToSocketNonBlocking(a,
                                        hdr))
     hdr->type++;
@@ -180,7 +180,7 @@
     if (OK != readFromSocket(b, &buf)) {
       FREE(hdr);
       return 16;
-    }    
+    }
     if (0 != memcmp(buf, hdr, 64+sizeof(CS_HEADER))) {
       printf("Failure in message %u.  Headers: %d ? %d\n",
             i,
@@ -206,13 +206,13 @@
   if (OK != readFromSocket(b, &buf)) {
     FREE(hdr);
     return 128;
-  }    
+  }
   if (0 != memcmp(buf, hdr, 64+sizeof(CS_HEADER))) {
     FREE(buf);
     FREE(hdr);
     return 256;
   }
-  FREE(buf);  
+  FREE(buf);
   FREE(hdr);
   return 0;
 }

Modified: GNUnet/src/util/timer.c
===================================================================
--- GNUnet/src/util/timer.c     2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/timer.c     2005-03-20 23:54:53 UTC (rev 464)
@@ -22,7 +22,7 @@
  * @file util/timer.c
  * @brief abstraction of the time and sleep functions
  * @author Christian Grothoff
- * 
+ *
  * GNUnet uses both 32-bit and 64-bit timer values.
  *
  * 32-bit timers are measured in seconds and are used
@@ -30,9 +30,9 @@
  * the network.  We don't really care if they overrun
  * in 2037, as long as the relative times are correct.<p>
  * The type used for these values is TIME_T since
- * some architectures use 64-bit time_t values. 
+ * some architectures use 64-bit time_t values.
  * We wrap all time() calls into "TIME()" calls and
- * replace time_t with a GNUnet internal, 32-bit 
+ * replace time_t with a GNUnet internal, 32-bit
  * TIME_T type.
  *
  * <p>
@@ -41,12 +41,12 @@
  * mostly used for internal timers.  Some
  * network messages also use milli-second precision,
  * but these are so far always relative times which
- * are again represented as 32-bit (int) values.  
+ * are again represented as 32-bit (int) values.
  * <p>
  *
  * Consequently, whenever handling times in GNUnet,
  * watch out for the types and units involved.
- */ 
+ */
 
 #include "gnunet_util.h"
 #include "platform.h"
@@ -56,7 +56,7 @@
    a cron-job scheduled after 1 minute in the code
    will occur after 6 seconds. This is useful for
    testing bugs that would otherwise occur only after
-   a long time. 
+   a long time.
 
    For releases, this value should always be 1 */
 #define SPEED_UP 1
@@ -75,17 +75,17 @@
  * Sleep for the specified time interval.  A signal interrupts the
  * sleep.  Caller is responsible to check that the sleep was long
  * enough.
- * 
- * @return 0 if there was no interrupt, 1 if there was, -1 on error.     
+ *
+ * @return 0 if there was no interrupt, 1 if there was, -1 on error.
  */
 int gnunet_util_sleep(cron_t delay) {
 #if LINUX || SOLARIS || SOMEBSD || OSX
   struct timespec req;
   struct timespec rem;
-  req.tv_sec  
+  req.tv_sec
     = delay / CRON_UNIT_TO_SECONDS;
-  req.tv_nsec 
-    = (delay - req.tv_sec * CRON_UNIT_TO_SECONDS) 
+  req.tv_nsec
+    = (delay - req.tv_sec * CRON_UNIT_TO_SECONDS)
     * NANOSEC_TO_CRON_UNIT;
   if (0 != nanosleep(&req, &rem)) {
     if (errno == EINTR) {
@@ -106,10 +106,10 @@
   int ret;
   struct timeval timeout;
 
-  timeout.tv_sec 
+  timeout.tv_sec
     = delay / CRON_UNIT_TO_SECONDS;
-  timeout.tv_usec 
-    = (delay - timeout.tv_sec * CRON_UNIT_TO_SECONDS) 
+  timeout.tv_usec
+    = (delay - timeout.tv_sec * CRON_UNIT_TO_SECONDS)
     * MICROSEC_TO_CRON_UNIT;
   ret = SELECT(0, NULL, NULL, NULL, &timeout);
   if (ret == -1) {
@@ -118,7 +118,7 @@
     } else {
       LOG_STRERROR(LOG_WARNING, "select");
       return -1;
-    }      
+    }
   }
   return 0;
 #endif
@@ -129,7 +129,7 @@
  * unit of time that the cron-jobs use (and is 64 bit)).
  *
  * @param setme will set the current time if non-null
- * @return the current time 
+ * @return the current time
  */
 cron_t cronTime(cron_t * setme) {
   cron_t res;
@@ -137,14 +137,14 @@
 #ifndef WINDOWS
   struct timezone tz; /* man page says it's obsolete, but
                         I'd rather not pass a NULL pointer */
-  
+
   gettimeofday(&tv, &tz);
 #else
   gettimeofday(&tv, NULL);
 #endif
-  res = 
+  res =
     (((cron_t)tv.tv_sec) * CRON_UNIT_TO_SECONDS) +
-    (tv.tv_usec / MICROSEC_TO_CRON_UNIT);    
+    (tv.tv_usec / MICROSEC_TO_CRON_UNIT);
   if (setme != NULL)
     *setme = res;
   return res;

Modified: GNUnet/src/util/timertest.c
===================================================================
--- GNUnet/src/util/timertest.c 2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/timertest.c 2005-03-20 23:54:53 UTC (rev 464)
@@ -1,4 +1,4 @@
-/** 
+/**
  * @file test/timertest.c
  * @brief testcase for util/timer.c; also measures how
  *  precise the timers are.  Expect values between 10 and 20 ms on
@@ -46,7 +46,7 @@
 #define MAXV 1500
   for (i=0;i<MAXV;i+=INCR) {
     cronTime(&last);
-    if (0 != gnunet_util_sleep(cronMILLIS * i)) 
+    if (0 != gnunet_util_sleep(cronMILLIS * i))
       return 5;
     cronTime(&now);
 #if VERBOSE
@@ -55,7 +55,7 @@
            i / cronMILLIS,
            (now - last) / cronMILLIS);
 #endif
-    if (last + cronMILLIS * i < now)      
+    if (last + cronMILLIS * i < now)
       cumDelta += (now - (last+cronMILLIS*i));
     else
       cumDelta += ((last+cronMILLIS*i) - now);
@@ -127,9 +127,9 @@
 
 
 /**
- * Perform option parsing from the command line. 
+ * Perform option parsing from the command line.
  */
-static int parseCommandLine(int argc, 
+static int parseCommandLine(int argc,
                            char * argv[]) {
   char c;
 
@@ -139,18 +139,18 @@
       { "config",  1, 0, 'c' },
       { 0,0,0,0 }
     };
-    
+
     c = GNgetopt_long(argc,
-                     argv, 
-                     "c:", 
-                     long_options, 
+                     argv,
+                     "c:",
+                     long_options,
                      &option_index);
-    
-    if (c == -1) 
+
+    if (c == -1)
       break;  /* No more flags to process */
-    
+
     switch(c) {
-    case 'c': 
+    case 'c':
       FREENONNULL(setConfigurationString("FILES",
                                         "gnunet.conf",
                                         GNoptarg));

Modified: GNUnet/src/util/vector.c
===================================================================
--- GNUnet/src/util/vector.c    2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/vector.c    2005-03-20 23:54:53 UTC (rev 464)
@@ -67,12 +67,12 @@
   VectorSegment *vs;
   int n;
   unsigned int sum = 0;
-  
+
   for (vs = v->segmentsHead; vs; vs = vs->next) {
-    fprintf(stderr, 
+    fprintf(stderr,
            "Segment-size: %3d / %d [%d...%d]: ",
-           vs->size, 
-           v->VECTOR_SEGMENT_SIZE, 
+           vs->size,
+           v->VECTOR_SEGMENT_SIZE,
            sum,
            sum + vs->size - 1);
     for (n=0;n<vs->size;n++) {
@@ -85,7 +85,7 @@
     sum += vs->size;
   }
   fprintf(stderr,
-         "Vector size: %u\n", 
+         "Vector size: %u\n",
          sum);
 }
 
@@ -93,7 +93,7 @@
  * Remove and return the element at given index in the segment's array. The
  * trailing pointers in the array, if any, are moved backwards to fill the gap.
  */
-static void *vectorSegmentRemoveAtIndex(VectorSegment *vs, 
+static void *vectorSegmentRemoveAtIndex(VectorSegment *vs,
                                        int index) {
    void *rvalue = vs->data[index];
 
@@ -108,7 +108,7 @@
 /**
  * Split the full segment vs into two half-full segments.
  */
-static void vectorSegmentSplit(Vector *v, 
+static void vectorSegmentSplit(Vector *v,
                               VectorSegment *vs) {
    VectorSegment *oldNext;
    int moveCount;
@@ -134,11 +134,11 @@
  * Joins the given segment with the following segment. The first segment _must_
  * be empty enough to store the data of both segments.
  */
-static void vectorSegmentJoin(Vector *v, 
+static void vectorSegmentJoin(Vector *v,
                              VectorSegment *vs) {
   VectorSegment *oldNext = vs->next->next;
-  
-  memcpy(vs->data + vs->size, 
+
+  memcpy(vs->data + vs->size,
         vs->next->data,
         vs->next->size * sizeof (void *));
   vs->size += vs->next->size;
@@ -154,9 +154,9 @@
 /**
  * Free an empty segment, _unless_ it is the only segment.
  */
-static void vectorSegmentRemove(Vector *v, 
+static void vectorSegmentRemove(Vector *v,
                                VectorSegment *vs) {
-  if ( (vs->previous == NULL) && 
+  if ( (vs->previous == NULL) &&
        (vs->next == NULL) )
     return;
   if (vs->previous != NULL)
@@ -178,13 +178,13 @@
  * If possible, an unused index at the end of a segment is returned, as this
  * is also a requirement for adding data in an empty vector.
  */
-static void vectorFindNewIndex(Vector *v, 
-                              unsigned int index, 
+static void vectorFindNewIndex(Vector *v,
+                              unsigned int index,
                               VectorSegment **vs,
                               int *segmentIndex) {
   VectorSegment *segment;
   int segmentStartIndex;
-   
+
   if (index > v->size) {
     *vs = NULL;
     *segmentIndex = -1;
@@ -196,10 +196,10 @@
     while (index > segmentStartIndex + segment->size) {
       segmentStartIndex += segment->size;
       segment = segment->next;
-    } 
-  } else { /* reverse */ 
+    }
+  } else { /* reverse */
     segment = v->segmentsTail;
-    segmentStartIndex = v->size - segment->size;    
+    segmentStartIndex = v->size - segment->size;
     while (index <= segmentStartIndex) {
       segment = segment->previous;
       segmentStartIndex -= segment->size;
@@ -220,7 +220,7 @@
                            int *segmentIndex) {
   VectorSegment *segment;
   int segmentStartIndex;
-  
+
   if (index >= v->size) {
     *vs = NULL;
     *segmentIndex = -1;
@@ -232,10 +232,10 @@
     while (index >= segmentStartIndex + segment->size) {
       segmentStartIndex += segment->size;
       segment = segment->next;
-    } 
+    }
   } else {
     segment = v->segmentsTail;
-    segmentStartIndex = v->size - segment->size;    
+    segmentStartIndex = v->size - segment->size;
     while (index < segmentStartIndex) {
       segment = segment->previous;
       segmentStartIndex -= segment->size;
@@ -246,10 +246,10 @@
 }
 
 
-/*  
+/*
  * Traverse the vector looking for a given object. When found, set the pointer
  * pointed to by vs to point to the object's segment and the integer pointed
- * to by segmentIndex to the object's index in the segment. If the object is 
+ * to by segmentIndex to the object's index in the segment. If the object is
  * not found, *vs is set to NULL.
  */
 static void vectorFindObject(Vector *v,
@@ -258,7 +258,7 @@
                             int *segmentIndex) {
   VectorSegment *segment;
   int i;
-  
+
   segment = v->segmentsHead;
   while (NULL != segment) {
     for (i=0;i<segment->size;i++) {
@@ -292,7 +292,7 @@
    rvalue->segmentsHead->previous = NULL;
    rvalue->segmentsHead->size = 0;
    rvalue->iteratorSegment = NULL;
-   rvalue->iteratorIndex = 0; 
+   rvalue->iteratorIndex = 0;
    return rvalue;
 }
 
@@ -332,8 +332,8 @@
   VectorSegment *segment;
   unsigned int segmentIndex;
   int i;
-  
-  if (index > v->size) 
+
+  if (index > v->size)
     return SYSERR;
   v->iteratorSegment = NULL;
   vectorFindNewIndex(v, index, &segment, &segmentIndex);
@@ -363,24 +363,24 @@
  * Return the element at given index in the vector or NULL if the index is out
  * of bounds. The iterator is set to point to the returned element.
  */
-void * vectorGetAt(Vector *v, 
+void * vectorGetAt(Vector *v,
                   unsigned int index) {
-  if ( (index < 0) || (index >= v->size) ) 
+  if ( (index < 0) || (index >= v->size) )
     return NULL;
   vectorFindIndex(v,
-                 index, 
-                 &v->iteratorSegment, 
+                 index,
+                 &v->iteratorSegment,
                  &v->iteratorIndex);
   return v->iteratorSegment->data[v->iteratorIndex];
 }
 
-/** 
+/**
  * Return the first element in the vector, whose index is 0, or NULL if the
  * vector is empty. The iterator of the vector is set to point to the first
  * element.
  */
 void * vectorGetFirst(Vector *v) {
-  if (v->size == 0) 
+  if (v->size == 0)
     return NULL;
   v->iteratorSegment = v->segmentsHead;
   v->iteratorIndex = 0;
@@ -392,7 +392,7 @@
  * empty. The iterator of the vector is set to the last element.
  */
 void * vectorGetLast(Vector *v) {
-  if (v->size == 0) 
+  if (v->size == 0)
     return NULL;
   v->iteratorSegment = v->segmentsTail;
   v->iteratorIndex = v->segmentsTail->size-1;
@@ -402,11 +402,11 @@
 /**
  * Return the next element in the vector, as called after vector_get_at() or
  * vector_get_first(). The return value is NULL if there are no more elements
- * in the vector or if the iterator has not been set. 
+ * in the vector or if the iterator has not been set.
  */
 void * vectorGetNext(Vector *v) {
-  if (v->iteratorSegment == NULL) 
-    return NULL;   
+  if (v->iteratorSegment == NULL)
+    return NULL;
   if (++v->iteratorIndex >= v->iteratorSegment->size) {
     if (v->iteratorSegment == v->segmentsTail) {
       v->iteratorSegment = NULL;
@@ -425,7 +425,7 @@
  * elements in the vector or if the iterator has not been set.
  */
 void * vectorGetPrevious(Vector * v) {
-  if (v->iteratorSegment == NULL) 
+  if (v->iteratorSegment == NULL)
     return NULL;
   if (--v->iteratorIndex == -1) {
     if (v->iteratorSegment == v->segmentsHead) {
@@ -440,26 +440,26 @@
 }
 
 /**
- * Delete and return the element at given index. NULL is returned if index is 
- * out of bounds. 
+ * Delete and return the element at given index. NULL is returned if index is
+ * out of bounds.
  */
-void * vectorRemoveAt(Vector *v, 
+void * vectorRemoveAt(Vector *v,
                      unsigned int index) {
   VectorSegment * segment;
   int segmentIndex;
   void *rvalue;
-  
-  if (index >= v->size) 
+
+  if (index >= v->size)
      return NULL;
   v->iteratorSegment = NULL;
   vectorFindIndex(v, index, &segment, &segmentIndex);
-  rvalue = vectorSegmentRemoveAtIndex(segment, 
+  rvalue = vectorSegmentRemoveAtIndex(segment,
                                      segmentIndex);
-  /* If the segment ends empty remove it, otherwise 
+  /* If the segment ends empty remove it, otherwise
      try to join it with its neighbors. */
   if (--segment->size == 0)
     vectorSegmentRemove(v, segment);
-  else if (segment->next && 
+  else if (segment->next &&
           segment->size + segment->next->size < v->VECTOR_SEGMENT_SIZE)
     vectorSegmentJoin(v, segment);
   else if (segment->previous &&
@@ -475,8 +475,8 @@
  */
 void *vectorRemoveLast (Vector *v) {
   void *rvalue;
-  
-  if (v->size == 0) 
+
+  if (v->size == 0)
     return NULL;
   v->iteratorSegment = NULL;
   rvalue = v->segmentsTail->data[v->segmentsTail->size - 1];
@@ -484,7 +484,7 @@
   if (--v->segmentsTail->size == 0)
     vectorSegmentRemove(v, v->segmentsTail);
   else if ( (v->segmentsTail->previous != NULL) &&
-           (v->segmentsTail->size + v->segmentsTail->previous->size 
+           (v->segmentsTail->size + v->segmentsTail->previous->size
             < v->VECTOR_SEGMENT_SIZE) )
     vectorSegmentJoin (v, v->segmentsTail->previous);
   v->size--;
@@ -499,19 +499,19 @@
   VectorSegment *segment;
   int segmentIndex;
   void * rvalue;
-  
+
   v->iteratorSegment = NULL;
   vectorFindObject(v, object, &segment, &segmentIndex);
-  if (segment == NULL) 
+  if (segment == NULL)
     return NULL;
   rvalue = vectorSegmentRemoveAtIndex(segment, segmentIndex);
   /* If the segment ends empty remove it, otherwise join it if necessary. */
   if (--segment->size == 0)
     vectorSegmentRemove (v, segment);
-  else if ( (segment->next != NULL) && 
+  else if ( (segment->next != NULL) &&
            (segment->size + segment->next->size < v->VECTOR_SEGMENT_SIZE) )
     vectorSegmentJoin (v, segment);
-  else if ( (segment->previous != NULL) && 
+  else if ( (segment->previous != NULL) &&
            (segment->size + segment->previous->size < v->VECTOR_SEGMENT_SIZE) )
     vectorSegmentJoin (v, segment->previous);
   v->size--;
@@ -519,17 +519,17 @@
 }
 
 /**
- * Set the given index in the vector. The old value of the index is 
+ * Set the given index in the vector. The old value of the index is
  * returned, or NULL if the index is out of bounds.
  */
-void *vectorSetAt (Vector *v, 
-                  void *object, 
+void *vectorSetAt (Vector *v,
+                  void *object,
                   unsigned int index) {
   VectorSegment *segment;
   int segmentIndex;
   void *rvalue;
-  
-  if (index >= v->size) 
+
+  if (index >= v->size)
     return NULL;
   v->iteratorSegment = NULL;
   vectorFindIndex(v, index, &segment, &segmentIndex);
@@ -543,16 +543,16 @@
  * Set the index occupied by the given object to point to the new object.
  * The old object is returned, or NULL if it's not found.
  */
-void *vectorSetObject(Vector *v, 
+void *vectorSetObject(Vector *v,
                      void *object,
                      void *oldObject) {
   VectorSegment *segment;
   int segmentIndex;
   void *rvalue;
-  
+
   v->iteratorSegment = NULL;
   vectorFindObject (v, oldObject, &segment, &segmentIndex);
-  if (segment == NULL) 
+  if (segment == NULL)
     return NULL;
   rvalue = segment->data[segmentIndex];
   segment->data[segmentIndex] = object;
@@ -560,12 +560,12 @@
 }
 
 
-/** 
+/**
  * Swaps the contents of index1 and index2. Return value is OK
  * on success, SYSERR if either index is out of bounds.
  */
-int vectorSwap(Vector *v, 
-              unsigned int index1, 
+int vectorSwap(Vector *v,
+              unsigned int index1,
               unsigned int index2) {
   VectorSegment * segment1;
   VectorSegment * segment2;
@@ -574,7 +574,7 @@
   void *temp;
 
   if ( (index1 >= v->size) ||
-       (index2 >= v->size) ) 
+       (index2 >= v->size) )
     return SYSERR;
   v->iteratorSegment= NULL;
   vectorFindIndex(v, index1, &segment1, &segmentIndex1);
@@ -588,7 +588,7 @@
 /**
  * Return the index of given element or -1 if the element is not found.
  */
-unsigned int vectorIndexOf(Vector *v, 
+unsigned int vectorIndexOf(Vector *v,
                           void *object) {
   VectorSegment * segment;
   unsigned int i;
@@ -598,8 +598,8 @@
   segment = v->segmentsHead;
   while (NULL != segment) {
     for (i = 0; i < segment->size; i++)
-      if (segment->data[i] == object) 
-       return segmentStartIndex + i;      
+      if (segment->data[i] == object)
+       return segmentStartIndex + i;
     segmentStartIndex += segment->size;
     segment = segment->next;
   }
@@ -607,7 +607,7 @@
 }
 
 
-/* 
+/*
  * Return the data stored in the vector as a single dynamically allocated
  * array of (void *), which must be free(3)d by the user. Use the functions
  * get_{at,first,last,next,previous} instead, unless you really need to access
@@ -617,13 +617,13 @@
   void **rvalue;
   VectorSegment *vs;
   size_t i = 0;
-  
+
   rvalue = xmalloc_unchecked_(v->size * sizeof (void *),
                              __FILE__,
                              __LINE__);
   for (vs = v->segmentsHead; vs; vs = vs->next) {
-    memcpy (rvalue + i, 
-           vs->data, 
+    memcpy (rvalue + i,
+           vs->data,
            vs->size * sizeof (void *));
     i += vs->size;
   }

Modified: GNUnet/src/util/vectortest.c
===================================================================
--- GNUnet/src/util/vectortest.c        2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/vectortest.c        2005-03-20 23:54:53 UTC (rev 464)
@@ -28,8 +28,8 @@
 
 static int test(int size) {
   struct Vector * v;
-   
-  v = vectorNew(size);   
+
+  v = vectorNew(size);
   if (0 != vectorSize(v))
     { DUMP(v); return 1; }
   if (OK != vectorInsertAt(v, "first", 0))
@@ -83,13 +83,13 @@
   int i;
   struct Vector * v;
 
-  v = vectorNew(size);   
-  
+  v = vectorNew(size);
+
   for (i=0;i<500;i++)
     if (OK != vectorInsertAt(v, (void*)i, 0))
       { DUMP(v); return 1; }
   if (500 != vectorSize(v))
-    { DUMP(v); return 1; } 
+    { DUMP(v); return 1; }
   for (i=0;i<500;i++)
     if (499 - i != (int) vectorGetAt(v, i))
       { DUMP(v); return 1; }
@@ -106,7 +106,7 @@
       { DUMP(v); return 1; }
   for (i=251;i<499;i++)
     if (i != (int) vectorGetPrevious(v))
-      { DUMP(v); return 1; }    
+      { DUMP(v); return 1; }
 
   vectorFree(v);
   return 0;

Modified: GNUnet/src/util/weakkeytest.c
===================================================================
--- GNUnet/src/util/weakkeytest.c       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/weakkeytest.c       2005-03-20 23:54:53 UTC (rev 464)
@@ -20,22 +20,22 @@
 }
 
 static int testWeakKey() {
-  char result[100];  
+  char result[100];
   char res[100];
   int size;
   SESSIONKEY weak_key;
 
-  weak_key.key[0]= (char)(0x4c); 
+  weak_key.key[0]= (char)(0x4c);
   weak_key.key[1]= (char)(0x31);
-  weak_key.key[2]= (char)(0xc6); 
-  weak_key.key[3]= (char)(0x2b); 
+  weak_key.key[2]= (char)(0xc6);
+  weak_key.key[3]= (char)(0x2b);
   weak_key.key[4]= (char)(0xc1);
   weak_key.key[5]= (char)(0x5f);
   weak_key.key[6]= (char)(0x4d);
   weak_key.key[7]= (char)(0x1f);
   weak_key.key[8]= (char)(0x31);
   weak_key.key[9]= (char)(0xaa);
-  weak_key.key[10]= (char)(0x12); 
+  weak_key.key[10]= (char)(0x12);
   weak_key.key[11]= (char)(0x2e);
   weak_key.key[12]= (char)(0xb7);
   weak_key.key[13]= (char)(0x82);
@@ -47,7 +47,7 @@
                       &weak_key,
                       INITVALUE,
                       result);
-   
+
   if (size == -1) {
     printf("weakkeytest failed: encryptBlock returned %d\n",
            size);
@@ -68,7 +68,7 @@
   if (0 != strcmp(res,WEAK_KEY_TESTSTRING)) {
     printf("weakkeytest failed: %s != %s\n", res, WEAK_KEY_TESTSTRING);
     return 1;
-  } 
+  }
   else
     return 0;
 }
@@ -80,8 +80,8 @@
 
   gcry_cipher_hd_t handle;
   int rc;
-  
-  for (number_of_runs = 0; number_of_runs < MAX_WEAK_KEY_TRIALS; 
+
+  for (number_of_runs = 0; number_of_runs < MAX_WEAK_KEY_TRIALS;
        number_of_runs++) {
 
     if (number_of_runs % 1000 == 0) printf(".");
@@ -101,33 +101,33 @@
     }
 
     rc = gcry_cipher_setkey(handle,
-                           &sessionkey, 
+                           &sessionkey,
                            sizeof(SESSIONKEY));
 
-    if ((char)rc == GPG_ERR_WEAK_KEY) {    
+    if ((char)rc == GPG_ERR_WEAK_KEY) {
       printf("\nWeak key (in hex): ");
       printWeakKey(&sessionkey);
       printf("\n");
       number_of_weak_keys++;
     }
     else if (rc) {
-      printf("\nUnexpected error generating keys. Error is %s\n", 
+      printf("\nUnexpected error generating keys. Error is %s\n",
              gcry_strerror(rc));
     }
 
     gcry_cipher_close(handle);
-           
+       
   }
 
   return number_of_weak_keys;
 }
 
 int main(int argc, char * argv[]) {
-  int weak_keys; 
+  int weak_keys;
 
   if (GENERATE_WEAK_KEYS) {
     weak_keys = getWeakKeys();
-  
+
     if (weak_keys == 0) {
       printf("No weak keys found in %d runs.", MAX_WEAK_KEY_TRIALS);
     }
@@ -142,6 +142,6 @@
     printf("WEAK KEY TEST FAILED.\n");
     return -1;
   }
-} 
+}
 
 /* end of weakkeytest.c */

Modified: GNUnet/src/util/win/win_printf.c
===================================================================
--- GNUnet/src/util/win/win_printf.c    2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/win/win_printf.c    2005-03-20 23:54:53 UTC (rev 464)
@@ -27,7 +27,7 @@
  */
 
 /* Stolen from Felix von Leitners "diet libc" 0.28 */
- 
+
 #include <stdarg.h>
 #include <sys/types.h>
 #include <stdio.h>
@@ -587,9 +587,9 @@
          if (width==0) width=1;
          if (!flag_dot) preci=6;
          if (flag_sign || d < +0.0) flag_in_sign=1;
-         
+       
          sz=__dtostr(d,s,sizeof(buf)-1,width,preci);
-         
+       
          if (flag_dot) {
            char *tmp;
            if ((tmp=strchr(s,'.'))) {
@@ -614,12 +614,12 @@
              if (tmp1) strcpy(tmp,tmp1);
            }
          }
-         
+       
          if ((flag_sign || flag_space) && d>=0) {
            *(--s)=(flag_sign)?'+':' ';
            ++sz;
          }
-         
+       
          sz=strlen(s);
          flag_dot=0;
          flag_hash=0;

Modified: GNUnet/src/util/win/winproc.c
===================================================================
--- GNUnet/src/util/win/winproc.c       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/win/winproc.c       2005-03-20 23:54:53 UTC (rev 464)
@@ -92,7 +92,7 @@
     }
   }
   ReleaseMutex(hSocksLock);
-  
+
   return bBlocking;
 }
 
@@ -111,13 +111,13 @@
       break;
     }
   }
-  
+
   if (bFound)
     pSocks[uiIndex].bBlocking = bBlocking;
   else
   {
     uiIndex = 0;
-    
+
     while(TRUE)
     {
       if (pSocks[uiIndex].s == -1)
@@ -130,7 +130,7 @@
         uiSockCount++;
         pSocks = (Winsock *) realloc(pSocks, (uiSockCount + 1) * 
sizeof(Winsock));
         pSocks[uiSockCount].s = -1;
-        
+
         break;
       }
       uiIndex++;
@@ -142,7 +142,7 @@
 void __win_DiscardHandleBlockingMode(SOCKET s)
 {
   unsigned int uiIndex;
-  
+
   WaitForSingleObject(hSocksLock, INFINITE);
   for(uiIndex = 0; uiIndex < uiSockCount; uiIndex++)
     if (pSocks[uiIndex].s == s)
@@ -186,7 +186,7 @@
     }
     CloseHandle(hFile);
   }
-  
+
   return i;
 }
 
@@ -206,7 +206,7 @@
   int retval = 0;
 
   errno = 0;
-  
+
   realpath(path, resolved_path);
   if(!resolved_path)
     retval = -1;
@@ -299,7 +299,7 @@
 void gettimeofday(struct timeval *tp, void *tzp)
 {
   struct _timeb theTime;
-  
+
   errno = 0;
 
   _ftime(&theTime);
@@ -316,7 +316,7 @@
   char szDest[_MAX_PATH + 1];
 
   errno = 0;
-  
+
   iLen = strlen(tmplate);
   if(iLen >= 6)
   {
@@ -344,9 +344,9 @@
     errno = EINVAL;
     return -1;
   }
-  
+
   conv_to_win_path(tmplate, szDest);
-  
+
   return _open(szDest, _O_CREAT | _O_EXCL, _S_IREAD | _S_IWRITE);
 }
 
@@ -388,7 +388,7 @@
   long lDirLen;
 
   /* Get the path of the calling module.
-     It should be located in one of the "bin" directories */  
+     It should be located in one of the "bin" directories */
   GetModuleFileName(NULL, szModule, MAX_PATH);
   _splitpath(szModule, szDrv, szDir, NULL, NULL);
 
@@ -461,7 +461,7 @@
   }
   else
   {
-    /* C:\My Documents */ 
+    /* C:\My Documents */
     long lRet;
 
     lHomeDirLen = _MAX_PATH;
@@ -531,7 +531,7 @@
                     FORMAT_MESSAGE_IGNORE_INSERTS, NULL, lRet, 0,
                     (LPTSTR) & pszMsg, 0, NULL);
 
-    pszMsg2 = (char *) MALLOC(lRet + 1); 
+    pszMsg2 = (char *) MALLOC(lRet + 1);
     strcpy(pszMsg2, pszMsg);
     if(pszMsg2[lRet - 2] == '\r')
       pszMsg2[lRet - 2] = 0;
@@ -540,7 +540,7 @@
             eAction == ROOT ? "root directory" :
               "home directory", pszMsg2);
     LocalFree(pszMsg);
-    FREE(pszMsg2); 
+    FREE(pszMsg2);
 
     exit(1);
   }
@@ -549,29 +549,29 @@
   if (WSAStartup(257, &wsaData) != 0)
   {
     LOG(LOG_FAILURE, "Cannot initialize Winsock.\n");
-    
+
     exit(1);
   }
-  
+
   /* To keep track of blocking/non-blocking sockets */
   pSocks = (Winsock *) malloc(sizeof(Winsock) + (uiSockCount + 1));
   pSocks[0].s = -1;
   hSocksLock = CreateMutex(NULL, FALSE, NULL);
-  
+
   /* To keep track of mapped files */
   pMappings = (TMapping *) malloc(sizeof(TMapping));
   pMappings[0].pStart = NULL;
   hMappingsLock = CreateMutex(NULL, FALSE, NULL);
-  
+
   /* Open files in binary mode */
   _fmode = _O_BINARY;
-  
+
   /* Get Windows version */
   theWinVersion.dwOSVersionInfoSize = sizeof(theWinVersion);
   GetVersionEx(&theWinVersion);
-  
+
   hNTDLL = LoadLibrary("ntdll.dll");
-    
+
   /* Function to get CPU usage under Win NT */
   if (hNTDLL)
   {
@@ -582,7 +582,7 @@
   {
     GNNtQuerySystemInformation = NULL;
   }
-  
+
   /* Functions to get information about a network adapter */
   hIphlpapi = LoadLibrary("iphlpapi.dll");
   if (hIphlpapi)
@@ -601,7 +601,7 @@
     GNGetIfTable = NULL;
     GNGetBestInterface = NULL;
   }
-  
+
   /* Service functions */
   hAdvapi = LoadLibrary("advapi32.dll");
   if (hAdvapi)
@@ -624,14 +624,14 @@
       GetProcAddress(hAdvapi, "ControlService");
     GNOpenService = (TOpenService)
       GetProcAddress(hAdvapi, "OpenServiceA");
-    
+
   }
-  
+
   /* Use ANSI codepage for console IO */
   SetConsoleCP(CP_ACP);
   SetConsoleOutputCP(CP_ACP);
   setlocale( LC_ALL, ".OCP" );
-  
+
   /* Initialize COM library */
   CoInitializeEx(NULL, COINIT_MULTITHREADED);
 }
@@ -644,14 +644,14 @@
   WSACleanup();
   free(pSocks);
   CloseHandle(hSocksLock);
-  
+
   free(pMappings);
   CloseHandle(hMappingsLock);
-  
+
   FreeLibrary(hNTDLL);
   FreeLibrary(hIphlpapi);
   FreeLibrary(hAdvapi);
-  
+
   CoUninitialize();
 }
 
@@ -663,7 +663,7 @@
   int iDepth = 0;
 
   errno = 0;
-   
+
   while (DereferenceShortcut(path))
   {
     if (iDepth++ > 10)
@@ -672,7 +672,7 @@
       return -1;
     }
   }
-  
+
   return errno ? -1 : 0;
 }
 
@@ -754,7 +754,7 @@
     pSrc++;
   }
   *pDest = 0;
-  
+
   if (derefLinks)
     __win_deref(pszWindows);
 
@@ -778,7 +778,7 @@
     case ERROR_SUCCESS:
       errno = 0;
       break;
-      
+
     case ERROR_INVALID_FUNCTION:
       errno = EBADRQC;
       break;
@@ -1098,15 +1098,15 @@
     case ERROR_BUFFER_OVERFLOW:
       errno = ENOMEM;
       break;
-      
+
     case ERROR_SERVICE_DOES_NOT_EXIST:
       errno = ESRCH;
       break;
-      
+
     case ERROR_SERVICE_EXISTS:
       errno = EEXIST;
       break;
-    
+
     default:
       errno = ESTALE;
       LOG(LOG_ERROR, " Unknown error %i in SetErrnoFromWinError(). " \
@@ -1285,7 +1285,7 @@
     case WSAEFAULT:
       errno = EFAULT;
       break;
-      
+
     default:
       errno = ESTALE;
       LOG(LOG_ERROR, " Unknown error %i in SetErrnoFromWinsockError()\n",
@@ -1345,7 +1345,7 @@
   switch(lWinError)
   {
     case WSAHOST_NOT_FOUND:
-      /* h_errno is defined as WSAGetLastError */    
+      /* h_errno is defined as WSAGetLastError */
       WSASetLastError(HOST_NOT_FOUND);
       break;
 
@@ -1372,12 +1372,12 @@
   HANDLE hFile;
   OVERLAPPED theOvInfo;
   BOOL bRet;
-  
+
   errno = 0;
-  
+
   hFile = (HANDLE) _get_osfhandle(fd);
   memset(&theOvInfo, sizeof(OVERLAPPED), 0);
-  
+
   /* Don't deadlock ourselves */
   if (theWinVersion.dwPlatformId == VER_PLATFORM_WIN32_NT)
     bRet = UnlockFileEx(hFile, 0, 1, 0, &theOvInfo);
@@ -1388,13 +1388,13 @@
   {
     if (!bRet && ((dwFlags = GetLastError()) != ERROR_NOT_LOCKED))
     {
-      SetErrnoFromWinError(dwFlags);  
+      SetErrnoFromWinError(dwFlags);
       return -1;
     }
     else
       return 0;
   }
-      
+
   if (operation & LOCK_EX)
   {
     dwFlags = LOCKFILE_EXCLUSIVE_LOCK;
@@ -1408,18 +1408,18 @@
     errno = EINVAL;
     return -1;
   }
-  
+
   if (operation & LOCK_NB)
     dwFlags |= LOCKFILE_FAIL_IMMEDIATELY;
-  
+
   if (theWinVersion.dwPlatformId == VER_PLATFORM_WIN32_NT)
     bRet = LockFileEx(hFile, dwFlags, 0, 1, 0, &theOvInfo);
   else
     bRet = LockFile(hFile, 0, 0, 1, 0);
-    
+
   if (! bRet)
   {
-    SetErrnoFromWinError(GetLastError());  
+    SetErrnoFromWinError(GetLastError());
     return -1;
   }
   else
@@ -1451,17 +1451,17 @@
   char szFile[_MAX_PATH + 1];
   FILE *hFile;
   int i;
-  
+
   if ((i = conv_to_win_path(filename, szFile)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(i);
-    
+
     return NULL;
   }
 
   hFile = fopen(szFile, mode);
   SetErrnoFromWinError(GetLastError());
-  
+
   return hFile;
 }
 
@@ -1472,13 +1472,13 @@
 {
   char szDir[_MAX_PATH + 1];
   long lRet;
-  
+
   if ((lRet = conv_to_win_path(dirname, szDir)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(lRet);
     return NULL;
-  }  
-  
+  }
+
   /* opendir sets errno */
   return opendir(szDir);
 }
@@ -1490,15 +1490,15 @@
 {
   char szDir[_MAX_PATH + 1];
   long lRet;
-  
+
   if ((lRet = conv_to_win_path(path, szDir)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(lRet);
     return -1;
-  }  
-  
+  }
+
   /* chdir sets errno */
-  return chdir(szDir);  
+  return chdir(szDir);
 }
 
 /**
@@ -1507,12 +1507,12 @@
 int _win_fstat(int handle, struct stat *buffer)
 {
   errno = 0;
-  
+
   /* File */
   if (fstat(handle, buffer) == -1)
   {
     /* We just check for a valid handle here */
-  
+
     /* Handle */
     memset(buffer, sizeof(struct stat), 0);
     GetFileType((HANDLE) handle);
@@ -1536,15 +1536,15 @@
 {
   char szDir[_MAX_PATH + 1];
   long lRet;
-  
+
   if ((lRet = conv_to_win_path(path, szDir)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(lRet);
     return -1;
-  }  
-  
+  }
+
   /* rmdir sets errno */
-  return rmdir(szDir);  
+  return rmdir(szDir);
 }
 
 /**
@@ -1557,7 +1557,7 @@
   if (!CreatePipe((HANDLE *) &phandles[0],(HANDLE *) &phandles[1], NULL, 0))
   {
     SetErrnoFromWinError(GetLastError());
-    
+
     return -1;
   }
   else
@@ -1574,15 +1574,15 @@
 {
   char szFile[_MAX_PATH + 1];
   long lRet;
-  
+
   if ((lRet = conv_to_win_path(path, szFile)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(lRet);
     return -1;
-  }  
-  
+  }
+
   /* access sets errno */
-  return access(szFile, mode);    
+  return access(szFile, mode);
 }
 
 /**
@@ -1592,15 +1592,15 @@
 {
   char szFile[_MAX_PATH + 1];
   long lRet;
-  
+
   if ((lRet = conv_to_win_path(filename, szFile)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(lRet);
     return -1;
-  }  
-  
+  }
+
   /* chmod sets errno */
-  return access(szFile, pmode);  
+  return access(szFile, pmode);
 }
 
 
@@ -1609,17 +1609,17 @@
   char szFile[_MAX_PATH + 1];
   long lRet;
   char *pszRet;
-  
+
   if ((lRet = conv_to_win_path(file_name, szFile)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(lRet);
     return NULL;
-  }  
-  
+  }
+
   pszRet = _fullpath(szFile, resolved_name, MAX_PATH);
   SetErrnoFromWinError(GetLastError());
-  
-  return pszRet;  
+
+  return pszRet;
 }
 
 /**
@@ -1630,13 +1630,13 @@
 {
   char szFile[_MAX_PATH + 1];
   long lRet;
-  
+
   if ((lRet = conv_to_win_path_ex(path, szFile, 0)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(lRet);
     return -1;
-  }  
-  
+  }
+
   /* remove sets errno */
   return remove(szFile);
 }
@@ -1650,19 +1650,19 @@
   char szOldName[_MAX_PATH + 1];
   char szNewName[_MAX_PATH + 1];
   long lRet;
-  
+
   if ((lRet = conv_to_win_path_ex(oldname, szOldName, 0)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(lRet);
     return -1;
-  }  
+  }
 
   if ((lRet = conv_to_win_path(newname, szNewName)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(lRet);
     return -1;
-  }  
-  
+  }
+
   /* rename sets errno */
   return rename(szOldName, szNewName);
 }
@@ -1674,27 +1674,27 @@
 {
   char szFile[_MAX_PATH + 1];
   long lRet;
-  
+
   if ((lRet = conv_to_win_path(path, szFile)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(lRet);
     return -1;
   }
-  
+
   /* Remove trailing slash */
   lRet = strlen(szFile) - 1;
   if (szFile[lRet] == '\\')
   {
     szFile[lRet] = 0;
   }
-  
+
   /* Dereference symlinks */
   if (iDeref)
   {
     if (__win_deref(szFile) == -1 && errno != EINVAL)
       return -1;
   }
-  
+
   /* stat sets errno */
   return stat(szFile, buffer);
 }
@@ -1715,13 +1715,13 @@
 {
   char szFile[_MAX_PATH + 1];
   long lRet;
-  
+
   if ((lRet = conv_to_win_path_ex(filename, szFile, 0)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(lRet);
     return -1;
-  }  
-  
+  }
+
   /* unlink sets errno */
   return unlink(szFile);
 }
@@ -1729,12 +1729,12 @@
 DWORD WINAPI __win_Write(TReadWriteInfo *pInfo)
 {
   int iRet;
-  
+
   errno = 0;
   if ((iRet = write(pInfo->fildes, pInfo->buf, pInfo->nbyte)) == -1)
   {
     DWORD dwWritten;
-    if (!WriteFile((HANDLE) pInfo->fildes, pInfo->buf, pInfo->nbyte, 
+    if (!WriteFile((HANDLE) pInfo->fildes, pInfo->buf, pInfo->nbyte,
       &dwWritten, NULL))
     {
       SetErrnoFromWinError(GetLastError());
@@ -1764,7 +1764,7 @@
     theInfo.fildes = fildes;
     theInfo.buf = (void *) buf;
     theInfo.nbyte = nbyte;
-    
+
     if (__win_IsHandleMarkedAsBlocking(fildes))
       return __win_Write(&theInfo);
     else
@@ -1779,7 +1779,7 @@
 DWORD WINAPI __win_Read(TReadWriteInfo *pInfo)
 {
   int iRet;
-  
+
   errno = 0;
   if ((iRet = read(pInfo->fildes, pInfo->buf, pInfo->nbyte)) == -1)
   {
@@ -1814,7 +1814,7 @@
     theInfo.fildes = fildes;
     theInfo.buf = buf;
     theInfo.nbyte = nbyte;
-    
+
     if (__win_IsHandleMarkedAsBlocking(fildes))
       return __win_Read(&theInfo);
     else
@@ -1836,7 +1836,7 @@
   WriteFile((HANDLE) _get_osfhandle(fileno(stream)), buffer, size, &dwWritten,
             NULL);
   SetErrnoFromWinError(GetLastError());
-  
+
   return dwWritten;
 }
 
@@ -1848,7 +1848,7 @@
   DWORD dwRead;
   int iItemsRead;
   void *pDest = buffer;
-  
+
   for(iItemsRead = 0; iItemsRead < count; iItemsRead++)
   {
     if (!ReadFile((HANDLE) _get_osfhandle(fileno(stream)), pDest, size,
@@ -1856,9 +1856,9 @@
       break;
     pDest += size;
   }
-  
+
   SetErrnoFromWinError(GetLastError());
-  
+
   return iItemsRead;
 }
 
@@ -1869,22 +1869,22 @@
 {
   char szFile1[_MAX_PATH + 1], szFile2[_MAX_PATH + 1];
   long lRet;
-  
+
   if ((lRet = conv_to_win_path(path1, szFile1)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(lRet);
     return -1;
-  }  
+  }
 
   if ((lRet = conv_to_win_path(path2, szFile2)) != ERROR_SUCCESS)
   {
     SetErrnoFromWinError(lRet);
     return -1;
-  }  
-  
+  }
+
   /* CreateShortcut sets errno */
   lRet = CreateShortcut(szFile1, szFile2);
-  
+
   return lRet ? 0 : -1;
 }
 
@@ -1919,43 +1919,43 @@
       access_param = FILE_MAP_COPY;
       break;
   }
-  
+
   sec_none.nLength = sizeof(SECURITY_ATTRIBUTES);
   sec_none.bInheritHandle = TRUE;
   sec_none.lpSecurityDescriptor = NULL;
-  
+
   hFile = (HANDLE) _get_osfhandle(fd);
-  
+
   h = CreateFileMapping(hFile, &sec_none, protect, 0, 0, NULL);
-  
+
   if (! h)
   {
     SetErrnoFromWinError(GetLastError());
     return (void *) -1;
   }
-  
+
   high = off >> 32;
   low = off & ULONG_MAX;
   base = NULL;
-  
+
   /* If a non-zero start is given, try mapping using the given address first.
      If it fails and flags is not MAP_FIXED, try again with NULL address. */
   if (start)
     base = MapViewOfFileEx(h, access_param, high, low, len, start);
   if (!base && !(flags & MAP_FIXED))
     base = MapViewOfFileEx(h, access_param, high, low, len, NULL);
-  
+
   if (!base || ((flags & MAP_FIXED) && base != start))
   {
     if (!base)
       SetErrnoFromWinError(GetLastError());
     else
       errno = EINVAL;
-    
+
     CloseHandle(h);
     return (void *) -1;
   }
-  
+
   /* Save mapping handle */
   WaitForSingleObject(hMappingsLock, INFINITE);
 
@@ -1967,11 +1967,11 @@
       break;
     }
   }
-  
+
   if (! bFound)
   {
     uiIndex = 0;
-    
+
     while(TRUE)
     {
       if (pMappings[uiIndex].pStart == NULL)
@@ -1984,14 +1984,14 @@
         uiMappingsCount++;
         pMappings = (TMapping *) realloc(pMappings, (uiMappingsCount + 1) * 
sizeof(TMapping));
         pMappings[uiMappingsCount].pStart = NULL;
-        
+
         break;
       }
       uiIndex++;
     }
   }
   ReleaseMutex(hMappingsLock);
-  
+
   return base;
 }
 
@@ -2005,12 +2005,12 @@
   unsigned uiIndex;
   BOOL success = UnmapViewOfFile(start);
   SetErrnoFromWinError(GetLastError());
-  
+
   if (success)
   {
     /* Release mapping handle */
     WaitForSingleObject(hMappingsLock, INFINITE);
-  
+
     for(uiIndex = 0; uiIndex <= uiMappingsCount; uiIndex++)
     {
       if (pMappings[uiIndex].pStart == start)
@@ -2023,10 +2023,10 @@
         break;
       }
     }
-    
+
     ReleaseMutex(hMappingsLock);
   }
-  
+
   return success ? 0 : -1;
 }
 
@@ -2035,7 +2035,7 @@
  */
 int _win_lstat(const char *path, struct stat *buf)
 {
-  return __win_stat(path, buf, 0);  
+  return __win_stat(path, buf, 0);
 }
 
 /**
@@ -2051,18 +2051,18 @@
     errno = ENAMETOOLONG;
     return -1;
   }
-    
+
   strcpy(szDeref, path);
-  
+
   if (__win_deref(szDeref) == -1)
     return -1;
-    
+
   if ((iLen = strlen(szDeref)) > bufsize)
   {
     errno = ENAMETOOLONG;
     return -1;
   }
-  
+
   errno = 0;
   return iLen;
 }
@@ -2074,15 +2074,15 @@
 char *nl_langinfo(int item)
 {
   unsigned int loc;
-  
+
   loc = GetThreadLocale();
-  
+
   switch(item)
   {
     case CODESET:
       {
         unsigned int cp = GetACP();
-        
+
         if (cp)
           sprintf(__langinfo, "CP%u", cp);
         else
@@ -2231,7 +2231,7 @@
       return __langinfo;
     case RADIXCHAR:
       GetLocaleInfo(loc, LOCALE_SDECIMAL, __langinfo, 251);
-      return __langinfo;      
+      return __langinfo;
     case THOUSEP:
       GetLocaleInfo(loc, LOCALE_STHOUSAND, __langinfo, 251);
       return __langinfo;
@@ -2265,7 +2265,7 @@
   int iRet = accept(s, addr, addrlen);
 
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return iRet;
 }
 
@@ -2277,7 +2277,7 @@
   int iRet = bind(s, name, namelen);
 
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return iRet;
 }
 
@@ -2288,7 +2288,7 @@
 {
   int iRet, iWSErr;
   BOOL bBlocking;
-  
+
   /* connect()ing a non-blocking socket always fails under Windows.
      Check whether it is blocking */
   bBlocking = __win_IsHandleMarkedAsBlocking(s);
@@ -2298,19 +2298,19 @@
     l = 0;
     ioctlsocket(s, FIONBIO, &l);
   }
-  
+
   iRet = connect(s, name, namelen);
   iWSErr = WSAGetLastError();
-  
+
   if (! bBlocking)
   {
     u_long l;
     l = 1;
     ioctlsocket(s, FIONBIO, &l);
   }
-    
+
   SetErrnoFromWinsockError(iWSErr);
-    
+
   return iRet;
 }
 
@@ -2323,32 +2323,32 @@
   int iRet = getpeername(s, name, namelen);
 
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return iRet;
 }
 
 /**
  * Get the socket name
  */
-int _win_getsockname(SOCKET s, struct sockaddr *name, 
+int _win_getsockname(SOCKET s, struct sockaddr *name,
                 int *namelen)
 {
   int iRet = getsockname(s, name, namelen);
 
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return iRet;
 }
 
 /**
- * Get the socket options 
+ * Get the socket options
  */
 int _win_getsockopt(SOCKET s, int level, int optname, char *optval, int 
*optlen)
 {
   int iRet = getsockopt(s, level, optname, optval, optlen);
 
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return iRet;
 }
 
@@ -2360,19 +2360,19 @@
   int iRet = listen(s, backlog);
 
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return iRet;
 }
 
 /**
- * Receive a message from a connected socket 
+ * Receive a message from a connected socket
  */
 int _win_recv(SOCKET s, char *buf, int len, int flags)
 {
   int iRet = recv(s, buf, len, flags);
 
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return iRet;
 }
 
@@ -2385,7 +2385,7 @@
   int iRet = recvfrom(s, buf, len, flags, from, fromlen);
 
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return iRet;
 }
 
@@ -2397,7 +2397,7 @@
   int iRet = send(s, buf, len, flags);
 
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return iRet;
 }
 
@@ -2410,7 +2410,7 @@
   int iRet = sendto(s, buf, len, flags, to, tolen);
 
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return iRet;
 }
 
@@ -2423,7 +2423,7 @@
   int iRet = setsockopt(s, level, optname, (const char *) optval, optlen);
 
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return iRet;
 }
 
@@ -2435,24 +2435,24 @@
   int iRet = shutdown(s, how);
 
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return iRet;
 }
 
 /**
- * Create an endpoint for communication 
+ * Create an endpoint for communication
  */
 SOCKET _win_socket(int af, int type, int protocol)
 {
   int iRet;
-  
+
   errno = 0;
-  
+
   iRet = socket(af, type, protocol);
   if (iRet == SOCKET_ERROR)
   {
     SetErrnoFromWinsockError(WSAGetLastError());
-    
+
     return -1;
   }
   else
@@ -2461,13 +2461,13 @@
     u_long l;
     l = 0;
     ioctlsocket(iRet, FIONBIO, &l);
-    
+
     return iRet;
   }
 }
 
 /**
- * Retrieve the host information corresponding to a network address 
+ * Retrieve the host information corresponding to a network address
  */
 struct hostent *_win_gethostbyaddr(const char *addr, int len, int type)
 {
@@ -2475,7 +2475,7 @@
 
   SetHErrnoFromWinError(WSAGetLastError());
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return pHost;
 }
 
@@ -2488,7 +2488,7 @@
 
   SetHErrnoFromWinError(WSAGetLastError());
   SetErrnoFromWinsockError(WSAGetLastError());
-    
+
   return pHost;
 }
 

Modified: GNUnet/src/util/win/winselect.c
===================================================================
--- GNUnet/src/util/win/winselect.c     2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/win/winselect.c     2005-03-20 23:54:53 UTC (rev 464)
@@ -25,7 +25,7 @@
  *
  * @file util/winselect.c
  * @brief select implementation for Win32
- * @author Wez Furlong <address@hidden>  
+ * @author Wez Furlong <address@hidden>
  * @author Nils Durner (GNUnet extensions)
  */
 
@@ -70,15 +70,15 @@
     ms_total = tv->tv_sec * 1000;
     ms_total += tv->tv_usec / 1000;
   }
-  
+
   /* select() may be used as a portable way to sleep */
   if (!(rfds || wfds || efds))
   {
     Sleep(ms_total);
-    
+
     return 0;
   }
-  
+
   FD_ZERO(&sock_read);
   FD_ZERO(&sock_write);
   FD_ZERO(&sock_except);
@@ -91,7 +91,7 @@
     {
       unsigned long ulVal;
 
-      if (ioctlsocket(i, FIONBIO, &ulVal) != SOCKET_ERROR) 
+      if (ioctlsocket(i, FIONBIO, &ulVal) != SOCKET_ERROR)
       {
         /* socket */
         if(SAFE_FD_ISSET(i, rfds))
@@ -151,15 +151,15 @@
       tvslice.tv_sec = 0;
       tvslice.tv_usec = 100000;
 
-      if ((retcode = select(sock_max_fd + 1, &aread, &awrite, &aexcept, 
+      if ((retcode = select(sock_max_fd + 1, &aread, &awrite, &aexcept,
                             &tvslice)) == SOCKET_ERROR)
       {
         SetErrnoFromWinsockError(WSAGetLastError());
-        
+
         return -1;
       }
     }
-    
+
     if(n_handles > 0)
     {
       /* check handles */
@@ -205,7 +205,7 @@
         }
       }
     }
-    
+
     /* Poll Pipes */
     for(i = 0; i < iPipes; i++)
     {

Modified: GNUnet/src/util/win/winstrptime.c
===================================================================
--- GNUnet/src/util/win/winstrptime.c   2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/win/winstrptime.c   2005-03-20 23:54:53 UTC (rev 464)
@@ -146,8 +146,8 @@
                   + (tm->tm_mday - 1));
 }
 
-char * 
-strptime_internal (const char *rp, const char *fmt, struct tm *tm, 
+char *
+strptime_internal (const char *rp, const char *fmt, struct tm *tm,
                   enum locale_status *decided)
 {
     const char *rp_backup;

Modified: GNUnet/src/util/xmalloc.c
===================================================================
--- GNUnet/src/util/xmalloc.c   2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/xmalloc.c   2005-03-20 23:54:53 UTC (rev 464)
@@ -20,28 +20,28 @@
 
 /**
  * @file util/xmalloc.c
- * @brief wrapper around malloc/free 
+ * @brief wrapper around malloc/free
  * @author Christian Grothoff
- */ 
+ */
 
 #include "gnunet_util.h"
 #include "platform.h"
 
 #define DEBUG_MALLOC 0
 
-#if DEBUG_MALLOC 
+#if DEBUG_MALLOC
 static Mutex lock;
 #endif
 
 
 void initXmalloc() {
-#if DEBUG_MALLOC 
+#if DEBUG_MALLOC
   MUTEX_CREATE(&lock);
 #endif
 }
 
 void doneXmalloc() {
-#if DEBUG_MALLOC 
+#if DEBUG_MALLOC
   MUTEX_DESTROY(&lock);
 #endif
 }
@@ -62,10 +62,10 @@
  * @param linenumber where in the code was the call to GROW
  * @return pointer to size bytes of memory
  */
-void * xmalloc_(size_t size, 
+void * xmalloc_(size_t size,
                const char * filename,
                const int linenumber) {
-  /* As a security precaution, we generally do not allow very large 
+  /* As a security precaution, we generally do not allow very large
      allocations using the default 'MALLOC' macro */
   if (size > 1024 * 1024 * 40)
     errexit(_("Unexpected very large allocation (%u bytes) at %s:%d!\n"),
@@ -73,24 +73,24 @@
   return xmalloc_unchecked_(size, filename, linenumber);
 }
 
-void * xmalloc_unchecked_(size_t size, 
+void * xmalloc_unchecked_(size_t size,
                          const char * filename,
                          const int linenumber) {
   void * result;
-  
+
   GNUNET_ASSERT(size < INT_MAX);
   result = malloc(size);
-#if DEBUG_MALLOC 
+#if DEBUG_MALLOC
   MUTEX_LOCK(&lock);
-  printf("%p malloc %s:%d (%d bytes)\n", 
-        result, 
+  printf("%p malloc %s:%d (%d bytes)\n",
+        result,
         filename,
         linenumber,
         size);
   fflush(stdout);
   MUTEX_UNLOCK(&lock);
 #endif
-  if (result == NULL) 
+  if (result == NULL)
     DIE_STRERROR_FL(filename, linenumber, "malloc");
   memset(result, 0, size); /* client code should not rely on this, though... */
   return result;
@@ -112,31 +112,31 @@
       const size_t n,
       const char * filename,
       const int linenumber) {
-#if DEBUG_MALLOC 
+#if DEBUG_MALLOC
   MUTEX_LOCK(&lock);
-  printf("%p free %s:%d\n", 
-   ptr, 
+  printf("%p free %s:%d\n",
+   ptr,
    filename,
    linenumber);
   MUTEX_UNLOCK(&lock);
-#endif        
-  
+#endif
+
   ptr = realloc(ptr, n);
 
-  if (!ptr) 
+  if (!ptr)
     DIE_STRERROR_FL(filename, linenumber, "realloc");
 
-#if DEBUG_MALLOC 
+#if DEBUG_MALLOC
   MUTEX_LOCK(&lock);
-  printf("%p malloc %s:%d (%d bytes)\n", 
-   ptr, 
+  printf("%p malloc %s:%d (%d bytes)\n",
+   ptr,
    filename,
    linenumber,
    n);
   fflush(stdout);
   MUTEX_UNLOCK(&lock);
 #endif
-    
+
   return ptr;
 }
 
@@ -148,14 +148,14 @@
  * @param filename where in the code was the call to GROW
  * @param linenumber where in the code was the call to GROW
  */
-void xfree_(void * ptr, 
+void xfree_(void * ptr,
            const char * filename,
            const int linenumber) {
   GNUNET_ASSERT_FL(filename, linenumber, ptr != NULL);
-#if DEBUG_MALLOC 
+#if DEBUG_MALLOC
   MUTEX_LOCK(&lock);
-  printf("%p free %s:%d\n", 
-        ptr, 
+  printf("%p free %s:%d\n",
+        ptr,
         filename,
         linenumber);
   fflush(stdout);
@@ -242,18 +242,18 @@
   } else {
     tmp = xmalloc_(size,
                   filename,
-                  linenumber);  
+                  linenumber);
     GNUNET_ASSERT(tmp != NULL);
     memset(tmp, 0, size); /* client code should not rely on this, though... */
     if (*oldCount > newCount)
       *oldCount = newCount; /* shrink is also allowed! */
-    memcpy(tmp, 
-          *old, 
+    memcpy(tmp,
+          *old,
           elementSize * (*oldCount));
   }
 
   if (*old != NULL) {
-    xfree_(*old, 
+    xfree_(*old,
           filename,
           linenumber);
   }

Modified: GNUnet/src/util/xmalloctest.c
===================================================================
--- GNUnet/src/util/xmalloctest.c       2005-03-20 23:31:34 UTC (rev 463)
+++ GNUnet/src/util/xmalloctest.c       2005-03-20 23:54:53 UTC (rev 464)
@@ -1,4 +1,4 @@
-/** 
+/**
  * @file test/xmalloctest.c
  * @brief testcase for util/xmalloc.c
  */
@@ -12,7 +12,7 @@
   int i;
   int j;
   int k;
-  
+
   /* MALLOC/FREE test */
   k = 352; /* random start value */
   for (i=1;i<MAX_TESTVAL;i++) {
@@ -20,13 +20,13 @@
     for (j=0;j<i;j++)
       ptrs[i][j] = k++;
   }
-  
+
   for (i=MAX_TESTVAL-1;i>=1;i--) {
     for (j=i-1;j>=0;j--)
       if (ptrs[i][j] != (char) --k)
        return 1;
     FREE(ptrs[i]);
-  }  
+  }
 
   /* STRNDUP tests */
   FREE(STRNDUP("foo", 0));
@@ -38,11 +38,11 @@
   if (0 != strcmp(ptrs[0], "fo"))
     return 2;
   FREE(ptrs[0]);
-  
+
   /* FREENONNULL test */
   FREENONNULL(NULL);
   FREENONNULL(MALLOC(4));
-  
+
   /* STRDUP tests */
   ptrs[0] = STRDUP("bar");
   if (0 != strcmp(ptrs[0], "bar"))
@@ -80,8 +80,8 @@
     return 8;
   if (ptrs[0] != NULL)
     return 9;
-  
 
+
   return 0;
 }
 





reply via email to

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