gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r2038 - in gnunet-gtk/src: common core include plugins/abou


From: grothoff
Subject: [GNUnet-SVN] r2038 - in gnunet-gtk/src: common core include plugins/about plugins/daemon plugins/fs plugins/fs/extensions plugins/stats
Date: Wed, 31 Aug 2005 14:40:58 -0700 (PDT)

Author: grothoff
Date: 2005-08-31 14:40:52 -0700 (Wed, 31 Aug 2005)
New Revision: 2038

Modified:
   gnunet-gtk/src/common/helper.c
   gnunet-gtk/src/core/main.c
   gnunet-gtk/src/include/gnunetgtk_common.h
   gnunet-gtk/src/plugins/about/about.c
   gnunet-gtk/src/plugins/daemon/daemon.c
   gnunet-gtk/src/plugins/fs/collection.c
   gnunet-gtk/src/plugins/fs/download.c
   gnunet-gtk/src/plugins/fs/extensions/musicinsert.c
   gnunet-gtk/src/plugins/fs/fs.c
   gnunet-gtk/src/plugins/fs/helper.c
   gnunet-gtk/src/plugins/fs/meta.c
   gnunet-gtk/src/plugins/fs/meta.h
   gnunet-gtk/src/plugins/fs/namespace.c
   gnunet-gtk/src/plugins/fs/search.c
   gnunet-gtk/src/plugins/fs/upload.c
   gnunet-gtk/src/plugins/stats/functions.c
   gnunet-gtk/src/plugins/stats/statistics.c
Log:
removing whitespace

Modified: gnunet-gtk/src/common/helper.c
===================================================================
--- gnunet-gtk/src/common/helper.c      2005-08-31 21:39:47 UTC (rev 2037)
+++ gnunet-gtk/src/common/helper.c      2005-08-31 21:40:52 UTC (rev 2038)
@@ -53,7 +53,7 @@
 static GtkWidget * infoWindowTextView;
 
 /**
- * the main thread 
+ * the main thread
  */
 static PTHREAD_T mainThread;
 
@@ -92,7 +92,7 @@
   }
 
   call->func(call->args);
-  if (call->sem != NULL) 
+  if (call->sem != NULL)
     SEMAPHORE_UP(call->sem);
   return FALSE;
 }
@@ -102,7 +102,7 @@
  * Since GTK doesn't work with multi-threaded applications under Windows,
  * all GTK operations have to be done in the main thread
  */
-void gtkSaveCall(SimpleCallback func, 
+void gtkSaveCall(SimpleCallback func,
                 void * args) {
   SaveCall call;
 
@@ -146,7 +146,7 @@
   /* sleep here is somewhat important, first of
      all, after completion we need to give the
      semaphore-mechanism time to remove the save-call
-     from the list to avoid running it twice; 
+     from the list to avoid running it twice;
      also, this function might be called in a tight
      loop (see search.c), so we should give the
      other threads some time to run.  */
@@ -155,7 +155,7 @@
 }
 
 /**
- * Callback for handling "delete_event": close the window 
+ * Callback for handling "delete_event": close the window
  */
 gint on_statusWindow_delete_event(GtkWidget * widget,
                             GdkEvent * event,
@@ -186,11 +186,11 @@
   gtk_text_buffer_get_iter_at_offset(buffer, &iter, -1);
   gtk_text_buffer_insert(buffer,
                         &iter,
-                        info->note, 
+                        info->note,
                         -1);
 }
 
-/** 
+/**
  * Appends a message to the info window
  *
  * @param doPopup do we open the window, YES or NO
@@ -205,7 +205,7 @@
   info.note = g_strdup_vprintf(format, args);
   va_end(args);
   info.doPopup = doPopup;
-  gtkSaveCall(&doInfoMessage, 
+  gtkSaveCall(&doInfoMessage,
              &info);
   g_free(info.note);
 }
@@ -229,7 +229,7 @@
                     (const char*) args);
 }
 
-/** 
+/**
  * Appends a log entry to the info window
  *
  * @param txt the log entry
@@ -239,7 +239,7 @@
                 ...) {
   va_list args;
   gchar * note;
-  
+
   va_start(args, txt);
   note = g_strdup_vprintf(txt, args);
   va_end(args);
@@ -397,12 +397,12 @@
   mainXML = glade_xml_new(gladeFile,
                          "mainWindow",
                          PACKAGE_NAME);
-  if (mainXML == NULL) 
+  if (mainXML == NULL)
     errexit(_("Failed to open `%s'.\n"),
            gladeFile);
   statusXML
     = glade_xml_new(getGladeFileName(),
-                   "statusWindow", 
+                   "statusWindow",
                    PACKAGE_NAME);
   infoWindow
     = glade_xml_get_widget(statusXML,
@@ -430,10 +430,10 @@
     Plugin * next;
 
     next = plugin->next;
-    unloadPlugin(plugin);   
+    unloadPlugin(plugin);
     plugin = next;
   }
- 
+
   gtk_widget_destroy(infoWindow);
   infoWindow = NULL;
   UNREF(statusXML);
@@ -445,15 +445,15 @@
   saveCallsUp = NO;
   PTHREAD_REL_SELF(&mainThread);
   MUTEX_LOCK(&sclock);
-  for (i=0;i<pscCount;i++) 
+  for (i=0;i<pscCount;i++)
     psc[i]->func(psc[i]);
   i = pscCount;
-  MUTEX_UNLOCK(&sclock); 
+  MUTEX_UNLOCK(&sclock);
   /* wait until all PSC-jobs have left
      the gtkSaveCall method before destroying
      the mutex! */
   while (i != 0) {
-    gnunet_util_sleep(50 * cronMILLIS);    
+    gnunet_util_sleep(50 * cronMILLIS);
     MUTEX_LOCK(&sclock);
     i = pscCount;
     MUTEX_UNLOCK(&sclock);
@@ -484,7 +484,7 @@
   PTHREAD_T doneThread;
   void * unused;
   struct rwsc_closure cls;
- 
+
   cls.sig = SEMAPHORE_NEW(0);
   cls.realMain = cb;
   cls.arg = arg;

Modified: gnunet-gtk/src/core/main.c
===================================================================
--- gnunet-gtk/src/core/main.c  2005-08-31 21:39:47 UTC (rev 2037)
+++ gnunet-gtk/src/core/main.c  2005-08-31 21:40:52 UTC (rev 2038)
@@ -105,21 +105,21 @@
   addLogEntry("%s", msg);
 }
 
-int main(int argc, 
+int main(int argc,
         char *argv[]) {
   GtkWidget * root;
-  
+
   g_thread_init(NULL);
   gtk_init(&argc, &argv);
-  if (SYSERR == initUtil(argc, 
-                        argv, 
+  if (SYSERR == initUtil(argc,
+                        argv,
                         &parseOptions))
     return 0;
-    
+
 #ifdef WINDOWS
   FreeConsole();
 #endif
-    
+
 #if ENABLE_NLS
   BINDTEXTDOMAIN("gnunet-gtk", PACKAGE_LOCALE_DIR);
   textdomain("gnunet-gtk");
@@ -135,12 +135,12 @@
   gtk_widget_show(root);
   setCustomLogProc(&customLog);
   /* start the event loop */
-  gdk_threads_enter();    
+  gdk_threads_enter();
   gtk_main();
   gdk_threads_leave();
   doneGNUnetGTKCommon();
   doneUtil();
-  
+
   return 0;
 }
 

Modified: gnunet-gtk/src/include/gnunetgtk_common.h
===================================================================
--- gnunet-gtk/src/include/gnunetgtk_common.h   2005-08-31 21:39:47 UTC (rev 
2037)
+++ gnunet-gtk/src/include/gnunetgtk_common.h   2005-08-31 21:40:52 UTC (rev 
2038)
@@ -20,7 +20,7 @@
 
 /**
  * @file src/include/gnunetgtk_common.h
- * @author Igor Wronsky 
+ * @author Igor Wronsky
  * @author Christian Grothoff
  */
 
@@ -44,15 +44,15 @@
 GladeXML * getMainXML(void);
 
 /**
- * Appends a message to the info window 
+ * Appends a message to the info window
  * @param doPopup if YES, the info window will
  *   be opened
  */
-void infoMessage(int doPopup, 
-                const char * format, 
+void infoMessage(int doPopup,
+                const char * format,
                 ...);
 
-/** 
+/**
  * Appends a log entry to the info window
  * and update the statusbar to show this
  * message (until the next call).
@@ -60,7 +60,7 @@
  * @param txt the log entry
  */
 void addLogEntry(const char * txt, ...);
-              
+       
 /**
  * Simple callback function.
  */
@@ -71,7 +71,7 @@
  * Since GTK doesn't work with multi-threaded applications under Windows,
  * all GTK operations have to be done in the main thread
  */
-void gtkSaveCall(SimpleCallback func, 
+void gtkSaveCall(SimpleCallback func,
                 void * arg);
 
 /**
@@ -96,5 +96,5 @@
  * Glade XML.
  */
 void connectGladeWithPlugins(GladeXML * xml);
- 
+
 #endif

Modified: gnunet-gtk/src/plugins/about/about.c
===================================================================
--- gnunet-gtk/src/plugins/about/about.c        2005-08-31 21:39:47 UTC (rev 
2037)
+++ gnunet-gtk/src/plugins/about/about.c        2005-08-31 21:40:52 UTC (rev 
2038)
@@ -36,10 +36,10 @@
                      gpointer data) {
   GtkWidget * ad;
   GladeXML * axml;
-  
+
   axml
     = glade_xml_new(getGladeFileName(),
-                   "aboutDialog", 
+                   "aboutDialog",
                    PACKAGE_NAME);
   ad
     = glade_xml_get_widget(axml,

Modified: gnunet-gtk/src/plugins/daemon/daemon.c
===================================================================
--- gnunet-gtk/src/plugins/daemon/daemon.c      2005-08-31 21:39:47 UTC (rev 
2037)
+++ gnunet-gtk/src/plugins/daemon/daemon.c      2005-08-31 21:40:52 UTC (rev 
2038)
@@ -43,7 +43,7 @@
   char * next;
   char * pos;
   char * desc;
- 
+
   model = gtk_list_store_new(2,
                             G_TYPE_STRING,
                             G_TYPE_STRING);
@@ -56,7 +56,7 @@
                                    "GNUNETD",
                                    "APPLICATIONS");
   }
-  if (apps != NULL) {    
+  if (apps != NULL) {
     next = apps;
     do {
       while (*next == ' ')
@@ -85,8 +85,8 @@
                           1, dgettext("GNUnet", desc),
                           -1);
        FREENONNULL(desc);
-      }    
-    } while (next != NULL);    
+      }
+    } while (next != NULL);
     FREE(apps);
   }
   w = glade_xml_get_widget(getMainXML(),
@@ -119,10 +119,10 @@
     launchEntry
       = glade_xml_get_widget(getMainXML(),
                             "startDaemon");
-    statsEntryYes 
+    statsEntryYes
       = glade_xml_get_widget(getMainXML(),
                             "statusPixmapYes");
-    statsEntryNo 
+    statsEntryNo
       = glade_xml_get_widget(getMainXML(),
                             "statusPixmapNo");
     host = getConfigurationString("NETWORK",
@@ -145,22 +145,22 @@
     gtk_widget_show_all(statsEntryYes);
     gtk_widget_set_sensitive(killEntry, TRUE);
     gtk_widget_set_sensitive(launchEntry, FALSE);
-  }    
+  }
 }
 
 static void cronCheckDaemon(void * dummy) {
   static int last = 42;
   int ret;
-  
+
   ret = checkGNUnetDaemonRunning();
   if (ret != last) {
-    last = ret;    
+    last = ret;
     gtkSaveCall(&doUpdateMenus, &ret);
-  }      
+  }
 }
 
 
-/** 
+/**
  * Launch gnunetd w/ checks
  */
 void on_startDaemon_clicked(GtkWidget * widget,
@@ -183,7 +183,7 @@
   }
 }
 
-/** 
+/**
  * Kill gnunetd
  */
 void on_stopDaemon_clicked(GtkWidget * widget,
@@ -193,23 +193,23 @@
     = glade_xml_get_widget(getMainXML(),
                           "stopDaemon");
   gtk_widget_set_sensitive(killEntry, FALSE);
-  
+
   if (OK == checkGNUnetDaemonRunning() ) {
     if (OK != stopGNUnetDaemon()) {
       GtkWidget * dialog;
 
-      dialog = gtk_message_dialog_new 
+      dialog = gtk_message_dialog_new
        (NULL,
         GTK_DIALOG_MODAL,
         GTK_MESSAGE_ERROR,
         GTK_BUTTONS_CLOSE,
         _("Error requesting shutdown of gnunetd."));
       gtk_dialog_run(GTK_DIALOG(dialog));
-      gtk_widget_destroy(dialog);  
+      gtk_widget_destroy(dialog);
     } else {
       addLogEntry(_("Terminating gnunetd..."));
     }
-  } 
+  }
   cronCheckDaemon(NULL);
 }
 
@@ -245,7 +245,7 @@
     = glade_xml_get_widget(getMainXML(),
                           "daemonScrolledWindow");
   gtk_widget_show(tab);
-  addCronJob(&cronCheckDaemon, 
+  addCronJob(&cronCheckDaemon,
             0,
             15 * cronSECONDS,
             NULL);
@@ -256,7 +256,7 @@
 }
 
 void done_daemon() {
-  delCronJob(&cronCheckDaemon, 
+  delCronJob(&cronCheckDaemon,
             15 * cronSECONDS,
             NULL);
   delCronJob(&updateAppModel,

Modified: gnunet-gtk/src/plugins/fs/collection.c
===================================================================
--- gnunet-gtk/src/plugins/fs/collection.c      2005-08-31 21:39:47 UTC (rev 
2037)
+++ gnunet-gtk/src/plugins/fs/collection.c      2005-08-31 21:40:52 UTC (rev 
2038)
@@ -37,14 +37,14 @@
 void on_collectionDialogMetaDataAddButton_clicked(gpointer dummy,
                                                  GtkWidget * uploadButton) {
   handleMetaDataListUpdate(metaXML,
-                          "collectionMetaDataTypeComboBox",               
+                          "collectionMetaDataTypeComboBox",            
                           "collectionMetaDataValueEntry",
                           "collectionMetaDataTreeView");
 }
 
 
 void createCollection_clicked(GtkWidget * dummy1,
-                              GtkWidget * dummy2) {  
+                              GtkWidget * dummy2) {
   const char * collectionName;
   const char * updateIntervalString;
   GtkWidget * w;
@@ -76,7 +76,7 @@
                             "collectionUpdateIntervalComboBoxEntry");
     nameLine
       = gtk_bin_get_child(GTK_BIN(nameLine));
-    updateIntervalString 
+    updateIntervalString
       = gtk_entry_get_text(GTK_ENTRY(nameLine));
     if (0 == strcmp(_("--sporadic update--"),
                    updateIntervalString))
@@ -89,24 +89,24 @@
       gtk_widget_destroy(dialog);
       UNREF(metaXML);
       metaXML = NULL;
-      dialog = gtk_message_dialog_new 
+      dialog = gtk_message_dialog_new
        (NULL,
         GTK_DIALOG_MODAL,
         GTK_MESSAGE_ERROR,
         GTK_BUTTONS_CLOSE,
         _("Failed to parse given time interval!"));
       gtk_dialog_run(GTK_DIALOG(dialog));
-      gtk_widget_destroy(dialog);      
+      gtk_widget_destroy(dialog);
       return;
     }
     meta = getMetaDataFromList(metaXML,
                               "collectionMetaDataTreeView",
                               NULL);
     spin = glade_xml_get_widget(metaXML,
-                               "collectionAnonymityLevel");    
+                               "collectionAnonymityLevel");
     nameLine = glade_xml_get_widget(metaXML,
                                    "collectionIdentifierEntry");
-    collectionName 
+    collectionName
       = gtk_entry_get_text(GTK_ENTRY(nameLine));
     root = NULL;
     if (OK == FSUI_startCollection(ctx,
@@ -123,8 +123,8 @@
       gtk_widget_set_sensitive(w, TRUE);
     } else {
       GtkWidget * dialog;
-      
-      dialog = gtk_message_dialog_new 
+
+      dialog = gtk_message_dialog_new
        (NULL,
         GTK_DIALOG_MODAL,
         GTK_MESSAGE_ERROR,
@@ -132,7 +132,7 @@
         _("Failed to start collection `%s' (consult logs)."),
         collectionName);
       gtk_dialog_run(GTK_DIALOG(dialog));
-      gtk_widget_destroy(dialog);  
+      gtk_widget_destroy(dialog);
     }
     ECRS_freeMetaData(meta);
   }
@@ -163,7 +163,7 @@
 void fs_collection_start() {
   GtkWidget * w;
 
-  if (NULL != FSUI_getCollection(ctx)) 
+  if (NULL != FSUI_getCollection(ctx))
     w = glade_xml_get_widget(getMainXML(),
                             "createCollection");
   else

Modified: gnunet-gtk/src/plugins/fs/download.c
===================================================================
--- gnunet-gtk/src/plugins/fs/download.c        2005-08-31 21:39:47 UTC (rev 
2037)
+++ gnunet-gtk/src/plugins/fs/download.c        2005-08-31 21:40:52 UTC (rev 
2038)
@@ -57,8 +57,8 @@
   pos = head;
   while (pos != NULL) {
     if (ECRS_equalsUri(uri,
-                       pos->uri)) 
-      break;    
+                       pos->uri))
+      break;
     pos = pos->next;
   }
   if (pos == NULL) {
@@ -90,8 +90,8 @@
                            -1);
         if ( (uri != NULL) &&
              (ECRS_equalsUri(uri,
-                             fi->uri)) ) 
-          return OK;      
+                             fi->uri)) )
+          return OK;
       }
     }
     gtk_tree_store_append(GTK_TREE_STORE(pos->model),
@@ -151,7 +151,7 @@
   } else {
     anon = gtk_spin_button_get_value_as_int
       (GTK_SPIN_BUTTON(spin));
-  }  
+  }
   if (! ECRS_isFileUri(uri)) {
     if (ECRS_isNamespaceUri(uri)) {
       /* start namespace search; would probably be better
@@ -171,9 +171,9 @@
       return;
     }
   }
-  filename = ECRS_uriToString(uri);  
+  filename = ECRS_uriToString(uri);
   if ( (filename == NULL) ||
-       (strlen(filename) < 
+       (strlen(filename) <
         strlen(ECRS_URI_PREFIX) +
         strlen(ECRS_FILE_INFIX)) ) {
     BREAK();
@@ -182,9 +182,9 @@
   }
   if (name == NULL)
     name = filename;
-    
-  addLogEntry(_("Downloading `%s'"), name);      
-    
+
+  addLogEntry(_("Downloading `%s'"), name);
+
   list = MALLOC(sizeof(DownloadList));
   list->next = head;
   list->rr = NULL;
@@ -208,19 +208,19 @@
                strlen(filename));
   strcpy(pfx, fn);
   if (pfx[strlen(pfx)-1] != DIR_SEPARATOR)
-    strcat(pfx, 
+    strcat(pfx,
            DIR_SEPARATOR_STR);
   strcpy(lnk, fn);
   FREE(fn);
   if (lnk[strlen(lnk)-1] != DIR_SEPARATOR)
-    strcat(lnk, 
+    strcat(lnk,
            DIR_SEPARATOR_STR);
-  strcat(pfx, 
+  strcat(pfx,
          name);
-  strcat(lnk, 
+  strcat(lnk,
          &filename[strlen(ECRS_URI_PREFIX) +
                    strlen(ECRS_FILE_INFIX)]);
-  
+
   /* Append ".gnd" if needed */
   if (mime && strcmp(mime, GNUNET_DIRECTORY_MIME) == 0) {
     int len = strlen(pfx);
@@ -231,7 +231,7 @@
     }
     strcat(pfx, GNUNET_DIRECTORY_EXT);
   }
-                   
+
 #ifdef WINDOWS
   {
     /* Do not exceed MAX_PATH under Windows
@@ -239,7 +239,7 @@
          $DOWNLOADDIR\hash.lnk
         or
          $INCOMINGDIR\hash.lnk
-         
+
        We truncate the hash here accordingly. */
 
     int diff; /* How much is INCOMINGDIR larger than DOWNLOADDIR */
@@ -247,17 +247,17 @@
                    "INCOMINGDIR",
                    _("You must specify a directory in the configuration"
                      " in section `%s' under `%s'."));
-                     
+
     diff = downDirLen - strlen(inc);
     if (diff < 0)
       diff = 0;
-    
+
     FREE(inc);
-    
+
     char *end = lnk + MAX_PATH - 5 - diff; /* 4 = ".lnk" */
-    
+
     *end = 0;
-    
+
     if (strchr(end + 1, DIR_SEPARATOR)) {
       BREAK();
       return;
@@ -272,7 +272,7 @@
     FREE(pfx);
     pfx = STRDUP(lnk);
   }
-  
+
   /* If file is inside a directory, get the full path */
   dirTreePath = gtk_tree_path_copy(path);
   dirPath = MALLOC(1);
@@ -284,8 +284,8 @@
     if (! gtk_tree_path_up(dirTreePath))
       break;
 
-    if (!gtk_tree_model_get_iter(model, 
-                                &iiter, 
+    if (!gtk_tree_model_get_iter(model,
+                                &iiter,
                                 dirTreePath))
       break;
     gtk_tree_model_get(model,
@@ -301,7 +301,7 @@
     dirPath = new;
   }
   gtk_tree_path_free(dirTreePath);
-  
+
   list->filename = pfx;
   head = list;
   gtk_tree_store_insert(summary,
@@ -316,7 +316,7 @@
                      DOWNLOAD_PROGRESS, 0, /* progress */
                      DOWNLOAD_URISTRING, filename,
                      DOWNLOAD_URI, ECRS_dupUri(uri),
-                     DOWNLOAD_TREEPATH, list->rr, 
+                     DOWNLOAD_TREEPATH, list->rr,
                      DOWNLOAD_DIRPATH, dirPath,
                      /* internal: row reference! */
                      -1);
@@ -352,11 +352,11 @@
   unsigned long long total;
   struct ECRS_URI * u;
   struct ECRS_MetaData * meta;
-  
 
+
   if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(summary),
                                     &iter)) {
-    do {    
+    do {
       gtk_tree_model_get(GTK_TREE_MODEL(summary),
                          &iter,
                          DOWNLOAD_SIZE, &total,
@@ -372,7 +372,7 @@
         gtk_tree_store_set(summary,
                            &iter,
                            DOWNLOAD_PROGRESS, val,
-                           -1);  
+                           -1);
         break;
       }
     } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary),
@@ -404,15 +404,15 @@
   GtkTreePath * path;
   struct ECRS_URI * u;
   char *dirPath;
-   
+
   pos = head;
   while (pos != NULL) {
     if (ECRS_equalsUri(uri,
-                       pos->uri)) 
-      break;    
+                       pos->uri))
+      break;
     pos = pos->next;
   }
-  if (pos == NULL) 
+  if (pos == NULL)
     return;
   if ( (pos->rr != NULL) &&
        (gtk_tree_row_reference_valid(pos->rr)) ) {
@@ -445,13 +445,13 @@
       gtk_tree_path_free(path);
       return;
     }
-    gtk_tree_path_free(path);  
+    gtk_tree_path_free(path);
   }
-  
+
   /* only rename top-level files, not files inside of directories! */
   if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(summary),
                                     &iter)) {
-    do {    
+    do {
       ln = NULL;
       fn = NULL;
       gtk_tree_model_get(GTK_TREE_MODEL(summary),
@@ -463,7 +463,7 @@
                          -1);
       if (ECRS_equalsUri(u, uri)) {
         char *dstPath, *newFn, *dstFile;
-        
+
         ren = ECRS_suggestFilename(ln);
         newFn = strrchr(ren ? ren : ln, DIR_SEPARATOR) + 1;
 
@@ -473,7 +473,7 @@
                            " in section `%s' under `%s'."));
         if (!dstPath)
           return;
-        
+
         /* If file is contained in a directory, create directory structure in
            the file system. */
         if (dirPath) {
@@ -486,14 +486,14 @@
             FREE(dirPath);
           }
         }
-          
+
         mkdirp(dstPath);
-                  
+
         dstFile = MALLOC(strlen(dstPath) + strlen(newFn) + 2);
         strcpy(dstFile, dstPath);
         strcat(dstFile, DIR_SEPARATOR_STR);
         strcat(dstFile, newFn);
-        
+
         if (RENAME(fn, dstFile) == -1) {
           /* renaming failed, try to copy */
           if (!copyFile(fn, dstFile)) {
@@ -501,10 +501,10 @@
               fn, dstFile, STRERROR(errno));
             FREE(dstFile);
             FREE(ren);
-            
+
             return;
           }
-                      
+
           if (REMOVE(fn) == -1)
             LOG(LOG_ERROR, _("Could not remove temporary file %s: %s\n"), fn, 
STRERROR(errno));
         }
@@ -514,7 +514,7 @@
         else
           REMOVE(ln);
         SYMLINK(dstFile, fn);
-        
+
         gtk_tree_store_set(summary,
                            &iter,
                            DOWNLOAD_LINKNAME, dstFile,
@@ -522,7 +522,7 @@
         FREENONNULL(ren);
         FREE(dstFile);
         FREE(dstPath);
-        
+
         break;
       }
     } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary),
@@ -545,7 +545,7 @@
 
   if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(summary),
                                     &iter)) {
-    do {    
+    do {
       gtk_tree_model_get(GTK_TREE_MODEL(summary),
                          &iter,
                          DOWNLOAD_FILENAME, &f,
@@ -600,7 +600,7 @@
   gtk_tree_store_remove(summary,
                         iter);
   if (cls.u != NULL)
-    ECRS_freeUri(cls.u); 
+    ECRS_freeUri(cls.u);
 }
 
 void on_abortDownloadButton_clicked(void * unused,
@@ -657,7 +657,7 @@
   GtkWidget * downloadList;
   GtkCellRenderer * renderer;
 
- 
+
   downloadList = glade_xml_get_widget(getMainXML(),
                                       "activeDownloadsList");
   summary =
@@ -666,10 +666,10 @@
                        G_TYPE_STRING, /* name (user-friendly name) */
                        G_TYPE_UINT64,  /* size */
                        G_TYPE_INT,  /* progress */
-                       G_TYPE_STRING, /* uri */                      
+                       G_TYPE_STRING, /* uri */
                        G_TYPE_POINTER,  /* url */
                        G_TYPE_POINTER, /* internal: gtk tree path / NULL */
-                       G_TYPE_POINTER); /* directory path if file is inside a 
dir */ 
+                       G_TYPE_POINTER); /* directory path if file is inside a 
dir */
   gtk_tree_view_set_model(GTK_TREE_VIEW(downloadList),
                           GTK_TREE_MODEL(summary));
   renderer = gtk_cell_renderer_progress_new();
@@ -711,7 +711,7 @@
   if (! gtk_tree_model_get_iter_first(GTK_TREE_MODEL(summary),
                                       &iter))
     return;
-  do {    
+  do {
     gtk_tree_model_get(GTK_TREE_MODEL(summary),
                        &iter,
                        DOWNLOAD_URI, &u,
@@ -720,7 +720,7 @@
     gtk_tree_store_set(summary,
                        &iter,
                        DOWNLOAD_URI, NULL,
-                       -1);  
+                       -1);
     if (u != NULL)
       ECRS_freeUri(u);
     FREENONNULL(dirPath);

Modified: gnunet-gtk/src/plugins/fs/extensions/musicinsert.c
===================================================================
--- gnunet-gtk/src/plugins/fs/extensions/musicinsert.c  2005-08-31 21:39:47 UTC 
(rev 2037)
+++ gnunet-gtk/src/plugins/fs/extensions/musicinsert.c  2005-08-31 21:40:52 UTC 
(rev 2038)
@@ -134,7 +134,7 @@
        gtk_widget_show (GTK_WIDGET (typecombobox));
 
        /*
-        * treeview creation 
+        * treeview creation
         */
 
        /* liststore model */
@@ -317,7 +317,7 @@
                            (gpointer) NULL);
 
        /*
-        * show the main window 
+        * show the main window
         */
        gtk_widget_show (musicinsertdialog);
 }
@@ -666,7 +666,7 @@
 
        /* TODO : take care of the 'Insert as an album'/'Insert files 
separately' options
         *  and create or not a gnunet directory containing the files
-        * 
+        *
      * TODO : Create a file and album description from metadatas - an idea :
         * Artist: Song (Album) - Type and Format # for files
      * Artist: Album - Type and number of the files # or album
@@ -1010,7 +1010,7 @@
                gtk_tree_view_get_selection (GTK_TREE_VIEW (filelist));
        GList *selected_paths =
                gtk_tree_selection_get_selected_rows (selection,
-                                                     (GtkTreeModel **)  
+                                                     (GtkTreeModel **)
                               &filelist_store);
        GList *selected_refs = NULL;
        GtkTreePath *path;

Modified: gnunet-gtk/src/plugins/fs/fs.c
===================================================================
--- gnunet-gtk/src/plugins/fs/fs.c      2005-08-31 21:39:47 UTC (rev 2037)
+++ gnunet-gtk/src/plugins/fs/fs.c      2005-08-31 21:40:52 UTC (rev 2038)
@@ -119,17 +119,17 @@
   GtkWidget * tab;
   GtkWidget * book;
   gint num;
-  
+
   tab
     = glade_xml_get_widget(getMainXML(),
                           "fsnotebook");
   gtk_widget_show(tab);
-  book  
+  book
     = glade_xml_get_widget(getMainXML(), "mainnotebook");
   num = gtk_notebook_get_current_page(GTK_NOTEBOOK(book));
   gtk_notebook_set_current_page(GTK_NOTEBOOK(book), 1);
   gtk_notebook_set_current_page(GTK_NOTEBOOK(book), num);
-  
+
   ctx = FSUI_start("gnunet-gtk",
                   YES,
                   &eventProcessor,

Modified: gnunet-gtk/src/plugins/fs/helper.c
===================================================================
--- gnunet-gtk/src/plugins/fs/helper.c  2005-08-31 21:39:47 UTC (rev 2037)
+++ gnunet-gtk/src/plugins/fs/helper.c  2005-08-31 21:40:52 UTC (rev 2038)
@@ -41,7 +41,7 @@
   unsigned int val;
   char * tmp;
   cron_t ret;
-  
+
   ret = 0;
   pos = 0;
 
@@ -54,7 +54,7 @@
                  pos - start);
     if (1 != sscanf(tmp,
                    "%u",
-                   &val) ) 
+                   &val) )
       return -1; /* parse error */
     FREE(tmp);
     while ( t[pos] == ' ')
@@ -84,10 +84,10 @@
                              strlen(_("days"))))
       ret += cronDAYS  * val;
     else
-      return SYSERR; /* parse error */ 
+      return SYSERR; /* parse error */
     while ( t[pos] == ' ')
       pos++;
-  }  
+  }
   *param = ret / cronSECONDS;
   return OK;
 }

Modified: gnunet-gtk/src/plugins/fs/meta.c
===================================================================
--- gnunet-gtk/src/plugins/fs/meta.c    2005-08-31 21:39:47 UTC (rev 2037)
+++ gnunet-gtk/src/plugins/fs/meta.c    2005-08-31 21:40:52 UTC (rev 2038)
@@ -33,7 +33,7 @@
 
 static int publishMetaData(EXTRACTOR_KeywordType type,
                           const char * data,
-                          void * cls) {  
+                          void * cls) {
   GtkListStore * store = cls;
   const char * stype;
   GtkTreeIter iter;
@@ -87,10 +87,10 @@
                                              NULL);
   gtk_tree_view_set_model(GTK_TREE_VIEW(metaList),
                          GTK_TREE_MODEL(metamodel));
-  if (init != NULL) 
+  if (init != NULL)
     ECRS_getMetaData(init,
                     &publishMetaData,
-                    metamodel);  
+                    metamodel);
   if ( (previewName == NULL) ||
        (init == NULL) )
     return;
@@ -107,11 +107,11 @@
     gdk_pixbuf_loader_write(loader,
                            (const guchar*) thumb,
                            ts,
-                           NULL);    
+                           NULL);
     pixbuf = gdk_pixbuf_loader_get_pixbuf(loader);
     g_object_ref(pixbuf);
     gdk_pixbuf_loader_close(loader,
-                           NULL);    
+                           NULL);
     if (pixbuf != NULL) {
       gtk_image_set_from_pixbuf(GTK_IMAGE(preview),
                                pixbuf);
@@ -169,7 +169,7 @@
   GtkCellRenderer * renderer;
   GtkListStore * keywordTypeModel;
   GtkTreeIter iter;
-  EXTRACTOR_KeywordType type; 
+  EXTRACTOR_KeywordType type;
 
   keywordTypeModel
     = gtk_list_store_new(KTYPE_NUM,
@@ -179,15 +179,15 @@
                                  name);
   gtk_combo_box_set_model(GTK_COMBO_BOX(metaType),
                          GTK_TREE_MODEL(keywordTypeModel));
-  for (type=0;type<EXTRACTOR_getHighestKeywordTypeNumber();type++) {   
-    stype = EXTRACTOR_getKeywordTypeAsString(type);    
+  for (type=0;type<EXTRACTOR_getHighestKeywordTypeNumber();type++) {
+    stype = EXTRACTOR_getKeywordTypeAsString(type);
     gtk_list_store_append(keywordTypeModel,
                          &iter);
     gtk_list_store_set(keywordTypeModel,
                       &iter,
                       KTYPE_STRING, stype,
                       KTYPE_TYPE, type,
-                      -1); 
+                      -1);
   }
   renderer = gtk_cell_renderer_text_new();
   gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(metaType),
@@ -208,7 +208,7 @@
   GtkWidget * entryLine;
   GtkListStore * keymodel;
   GtkTreeIter iter;
-  
+
   keywordList = glade_xml_get_widget(xml,
                                     keywordListName);
   keymodel
@@ -222,11 +222,11 @@
   gtk_list_store_set(keymodel,
                     &iter,
                     0, keyword,
-                    -1); 
+                    -1);
   gtk_entry_set_text(GTK_ENTRY(entryLine), "");
 }
 
-void handleMetaDataListUpdate(GladeXML * xml,                        
+void handleMetaDataListUpdate(GladeXML * xml,                  
                              const char * typeInputLineName,
                              const char * valueInputLineName,
                              const char * metaDataListName) {
@@ -239,19 +239,19 @@
   GtkListStore * typemodel;
   GtkTreeIter iter;
   char * stype;
-  
+
   metaList = glade_xml_get_widget(xml,
                                  metaDataListName);
   metamodel
     = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(metaList)));
 
   entryLine = glade_xml_get_widget(xml,
-                                  valueInputLineName); 
+                                  valueInputLineName);
   value = gtk_entry_get_text(GTK_ENTRY(entryLine));
   if ( (value == NULL) || (strlen(value) == 0) )
     return;
   typeCB = glade_xml_get_widget(xml,
-                               typeInputLineName); 
+                               typeInputLineName);
   typemodel
     = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(typeCB)));
   if (! gtk_combo_box_get_active_iter(GTK_COMBO_BOX(typeCB),
@@ -261,7 +261,7 @@
                     &iter,
                     KTYPE_STRING, &stype,
                     KTYPE_TYPE, &type,
-                    -1);  
+                    -1);
   gtk_list_store_append(metamodel,
                        &iter);
   gtk_list_store_set(metamodel,
@@ -269,7 +269,7 @@
                     META_TYPE, type,
                     META_STYPE, stype,
                     META_VALUE, value,
-                    -1); 
+                    -1);
   gtk_entry_set_text(GTK_ENTRY(entryLine), "");
 }
 
@@ -303,17 +303,17 @@
     } while (gtk_tree_model_iter_next(metamodel,
                                      &iter));
   }
-  if (previewName == NULL) 
+  if (previewName == NULL)
     return meta;
 
   preview = glade_xml_get_widget(xml,
                                 previewName);
-  
-  if (GTK_IMAGE_PIXBUF == 
+
+  if (GTK_IMAGE_PIXBUF ==
       gtk_image_get_storage_type(GTK_IMAGE(preview))) {
     size_t length;
     char * thumb;
-    
+
     pixbuf = gtk_image_get_pixbuf(GTK_IMAGE(preview));
     if (pixbuf != NULL) {
       thumb = NULL;
@@ -334,7 +334,7 @@
        FREE(binary);   
       }
     }
-  } 
+  }
   return meta;
 }
 
@@ -352,7 +352,7 @@
   keyList = GTK_TREE_VIEW(glade_xml_get_widget(xml,
                                               name));
   keymodel = gtk_tree_view_get_model(keyList);
-  
+
   keywords = NULL;
   ksize = 0;
   GROW(keywords,
@@ -375,9 +375,9 @@
                                      &iter));
   }
   keywords[kpos] = NULL;
-  
-  keywordURI = ECRS_keywordsToUri((const char**)keywords);    
-  while (kpos > 0) 
+
+  keywordURI = ECRS_keywordsToUri((const char**)keywords);
+  while (kpos > 0)
     FREE(keywords[--kpos]);
   GROW(keywords,
        ksize,
@@ -403,7 +403,7 @@
   else if (0 == strcmp(_("--no update--"),
                       timeSpec))
     *interval = ECRS_SBLOCK_UPDATE_NONE;
-  else 
+  else
     return parseTime(timeSpec,
                     interval);
   return OK;

Modified: gnunet-gtk/src/plugins/fs/meta.h
===================================================================
--- gnunet-gtk/src/plugins/fs/meta.h    2005-08-31 21:39:47 UTC (rev 2037)
+++ gnunet-gtk/src/plugins/fs/meta.h    2005-08-31 21:40:52 UTC (rev 2038)
@@ -46,7 +46,7 @@
                             const char * inputLineName,
                             const char * keywordListName);
 
-void handleMetaDataListUpdate(GladeXML * xml,                        
+void handleMetaDataListUpdate(GladeXML * xml,                  
                              const char * typeInputLineName,
                              const char * valueInputLineName,
                              const char * metaDataListName);

Modified: gnunet-gtk/src/plugins/fs/namespace.c
===================================================================
--- gnunet-gtk/src/plugins/fs/namespace.c       2005-08-31 21:39:47 UTC (rev 
2037)
+++ gnunet-gtk/src/plugins/fs/namespace.c       2005-08-31 21:40:52 UTC (rev 
2038)
@@ -63,7 +63,7 @@
 
   namespaceXML
     = glade_xml_new(getGladeFileName(),
-                   "namespaceContentFrame", 
+                   "namespaceContentFrame",
                    PACKAGE_NAME);
   connectGladeWithPlugins(namespaceXML);
   window = glade_xml_get_widget(namespaceXML,
@@ -79,11 +79,11 @@
                       G_TYPE_STRING, /* (file)name */
                       G_TYPE_UINT64,  /* size */
                       G_TYPE_STRING, /* description */
-                      G_TYPE_STRING, /* mime-type */ 
-                      G_TYPE_STRING, /* last-ID */   
-                      G_TYPE_STRING, /* next-ID */   
-                      G_TYPE_STRING, /* pub-freq */   
-                      G_TYPE_STRING, /* next pub date */   
+                      G_TYPE_STRING, /* mime-type */
+                      G_TYPE_STRING, /* last-ID */
+                      G_TYPE_STRING, /* next-ID */
+                      G_TYPE_STRING, /* pub-freq */
+                      G_TYPE_STRING, /* next pub date */
                       G_TYPE_POINTER,  /* URI */
                       G_TYPE_POINTER);  /* META */
   gtk_tree_view_set_model(GTK_TREE_VIEW(resultList),
@@ -178,7 +178,7 @@
                         NAMESPACE_URI, &euri,
                         -1);
       if (ECRS_equalsUri(euri,
-                        fi->uri)) 
+                        fi->uri))
        return OK; /* already listed */
     } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(model),
                                      &iter));
@@ -194,9 +194,9 @@
                                       EXTRACTOR_CREATOR,
                                       EXTRACTOR_PRODUCER,
                                       EXTRACTOR_UNKNOWN,
-                                      -1); 
+                                      -1);
   if (filename == NULL)
-    filename = STRDUP(_("no name given")); 
+    filename = STRDUP(_("no name given"));
   if (ECRS_isFileUri(fi->uri))
     size = ECRS_fileSize(fi->uri);
   else
@@ -233,10 +233,10 @@
                         -1);
       ECRS_freeUri(uri);
       ECRS_freeMetaData(meta);
-      
+
     } while (gtk_list_store_remove(GTK_LIST_STORE(model),
                                   &iter));
-  }  
+  }
 }
 
 /**
@@ -303,9 +303,9 @@
                                       EXTRACTOR_CREATOR,
                                       EXTRACTOR_PRODUCER,
                                       EXTRACTOR_UNKNOWN,
-                                      -1); 
+                                      -1);
   if (filename == NULL)
-    filename = STRDUP(_("no name given")); 
+    filename = STRDUP(_("no name given"));
   desc = ECRS_getFirstFromMetaData(fi->meta,
                                   EXTRACTOR_DESCRIPTION,
                                   EXTRACTOR_GENRE,
@@ -328,17 +328,17 @@
     size = 0;
   uriString = ECRS_uriToString(fi->uri);
   hash2enc(lastId, &last);
-  if (nextId != NULL) 
+  if (nextId != NULL)
     hash2enc(nextId, &next);
   else
     memset(&next, 0, sizeof(EncName));
-  if (publicationFrequency == ECRS_SBLOCK_UPDATE_SPORADIC) 
+  if (publicationFrequency == ECRS_SBLOCK_UPDATE_SPORADIC)
     date = STRDUP(_("unspecified"));
-  else if (publicationFrequency == ECRS_SBLOCK_UPDATE_NONE) 
+  else if (publicationFrequency == ECRS_SBLOCK_UPDATE_NONE)
     date = STRDUP(_("never"));
-  else 
+  else
     date = GN_CTIME(&nextPublicationTime);
-  
+
   freq = updateIntervalToString(publicationFrequency);
   gtk_list_store_append(model,
                        &iter);
@@ -445,14 +445,14 @@
   connectGladeWithPlugins(metaXML);
   dialog = glade_xml_get_widget(metaXML,
                                "namespaceMetaDataDialog");
-  createMetaDataListTreeView(metaXML,                       
+  createMetaDataListTreeView(metaXML,                  
                             "namespaceMetaDataDialogMetaDataList",
                             NULL,
                             NULL);
   createKeywordListTreeView(metaXML,
                            "namespaceMetaDataDialogKeywordList",
                            NULL);
-  createMetaTypeComboBox(metaXML,                       
+  createMetaTypeComboBox(metaXML,                      
                         "namespaceMetaDataDialogMetaTypeComboBox");
   gtk_dialog_set_default_response(GTK_DIALOG(dialog),
                                  GTK_RESPONSE_OK);
@@ -461,19 +461,19 @@
       = getMetaDataFromList(metaXML,
                            "namespaceMetaDataDialogMetaDataList",
                            NULL);
-    keywordURI 
+    keywordURI
       = getKeywordURIFromList(metaXML,
                              "namespaceMetaDataDialogKeywordList");
     spin = glade_xml_get_widget(metaXML,
-                               "namespaceAnonymityspinbutton");    
+                               "namespaceAnonymityspinbutton");
     nameLine = glade_xml_get_widget(metaXML,
                                    "namespaceRootEntry");
     namespaceName = gtk_entry_get_text(GTK_ENTRY(nameLine));
-    if (namespaceName == NULL) 
+    if (namespaceName == NULL)
       namespaceName = "root"; /* do NOT translate "root"! */
     hash(namespaceName,
         strlen(namespaceName),
-        &rootEntry);    
+        &rootEntry);
     nameLine = glade_xml_get_widget(metaXML,
                                    "namespaceNameEntry");
     namespaceName = gtk_entry_get_text(GTK_ENTRY(nameLine));
@@ -495,8 +495,8 @@
       ECRS_freeUri(root);
     } else {
       GtkWidget * dialog;
-      
-      dialog = gtk_message_dialog_new 
+
+      dialog = gtk_message_dialog_new
        (NULL,
         GTK_DIALOG_MODAL,
         GTK_MESSAGE_ERROR,
@@ -507,7 +507,7 @@
           "already exists."),
         namespaceName);
       gtk_dialog_run(GTK_DIALOG(dialog));
-      gtk_widget_destroy(dialog);  
+      gtk_widget_destroy(dialog);
     }
     ECRS_freeMetaData(meta);
     ECRS_freeUri(keywordURI);
@@ -524,31 +524,31 @@
   NamespaceList * prev;
   gint num;
   GtkWidget * page;
-  GtkWidget * dialog;    
+  GtkWidget * dialog;
   gint ret;
 
   notebook
     = glade_xml_get_widget(getMainXML(),
                           "localNamespacesNotebook");
-  num 
+  num
     = gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook));
   if (num == -1) {
     /* IMPROVE-ME: disable the menu item
        as long as this may happen! */
-    dialog = gtk_message_dialog_new 
+    dialog = gtk_message_dialog_new
       (NULL,
        GTK_DIALOG_MODAL,
        GTK_MESSAGE_ERROR,
        GTK_BUTTONS_CLOSE,
        _("No local namespaces available that could be deleted!"));
     gtk_dialog_run(GTK_DIALOG(dialog));
-    gtk_widget_destroy(dialog);      
+    gtk_widget_destroy(dialog);
     return;
   }
   page
     = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),
                                num);
-  list 
+  list
     = head;
   prev
     = NULL;
@@ -563,8 +563,8 @@
   }
   /* open window to ask for confirmation,
      only then delete */
-  
-  dialog = gtk_message_dialog_new 
+
+  dialog = gtk_message_dialog_new
     (NULL,
      GTK_DIALOG_MODAL,
      GTK_MESSAGE_ERROR,
@@ -572,7 +572,7 @@
      _("Should the namespace `%s' really be deleted?"),
      list->name);
   ret = gtk_dialog_run(GTK_DIALOG(dialog));
-  gtk_widget_destroy(dialog);      
+  gtk_widget_destroy(dialog);
   if (GTK_RESPONSE_YES != ret)
     return;
 
@@ -594,7 +594,7 @@
   TIME_T updateInterval;
   HashCode512 * lastId;
   HashCode512 thisId;
-  HashCode512 * nextId;  
+  HashCode512 * nextId;
   struct ECRS_MetaData * meta;
 } IUC;
 
@@ -625,11 +625,11 @@
      original file ID (ometa) with the new metadata (cls->meta) here;
      or if we limit us to one file at a time, show the original
      metadata immediately with the dialog. */
-  
+
   if (dst == NULL) {
     BREAK();
     return;
-  }  
+  }
   resultURI = FSUI_addToNamespace(ctx,
                                  cls->anonymityLevel,
                                  cls->namespaceName,
@@ -664,7 +664,7 @@
                _("Failed to insert content into namespace "
                  "(consult logs).\n"));
   }
-} 
+}
 
 void on_namespaceInsertMetaDataDialogMetaDataAddButton_clicked(GtkWidget * 
dummy1,
                                                               GtkWidget * 
dummy2) {
@@ -693,20 +693,20 @@
   contentList
     = glade_xml_get_widget(getMainXML(),
                           "availableContentList");
-  selection 
+  selection
     = gtk_tree_view_get_selection(GTK_TREE_VIEW(contentList));
   if (0 == gtk_tree_selection_count_selected_rows(selection)) {
    /* IMPROVE-ME: disable the menu item
       as long as this may happen! */
-    dialog = gtk_message_dialog_new 
+    dialog = gtk_message_dialog_new
       (NULL,
        GTK_DIALOG_MODAL,
        GTK_MESSAGE_ERROR,
        GTK_BUTTONS_CLOSE,
        _("You must select some available content for publication first!"));
     gtk_dialog_run(GTK_DIALOG(dialog));
-    gtk_widget_destroy(dialog);      
-    return;    
+    gtk_widget_destroy(dialog);
+    return;
   }
   if (FALSE == gtk_tree_selection_get_selected(selection,
                                               NULL,
@@ -758,14 +758,14 @@
       gtk_widget_destroy(dialog);
       UNREF(metaXML);
       metaXML = NULL;
-      dialog = gtk_message_dialog_new 
+      dialog = gtk_message_dialog_new
        (NULL,
         GTK_DIALOG_MODAL,
         GTK_MESSAGE_ERROR,
         GTK_BUTTONS_CLOSE,
         _("Failed to parse given time interval!"));
       gtk_dialog_run(GTK_DIALOG(dialog));
-      gtk_widget_destroy(dialog);      
+      gtk_widget_destroy(dialog);
       return;
     }
 
@@ -774,7 +774,7 @@
                               "namespaceInsertPreview");
     cls.anonymityLevel
       = getAnonymityLevel(metaXML,
-                         "anonymitySpinButton");    
+                         "anonymitySpinButton");
     nameLine = glade_xml_get_widget(metaXML,
                                    "namespaceContentIdentifierEntry");
     identifierName = gtk_entry_get_text(GTK_ENTRY(nameLine));
@@ -791,7 +791,7 @@
     if ( (identifierName == NULL) ||
         (strlen(identifierName) == 0)) {
       cls.nextId = NULL;
-    } else {      
+    } else {
       hash(identifierName,
           strlen(identifierName),
           &nextId);
@@ -836,20 +836,20 @@
   contentList
     = glade_xml_get_widget(getMainXML(),
                           "availableContentList");
-  selection 
+  selection
     = gtk_tree_view_get_selection(GTK_TREE_VIEW(contentList));
   if (0 == gtk_tree_selection_count_selected_rows(selection)) {
     /* IMPROVE-ME: disable the menu item
        as long as this may happen! */
-    dialog = gtk_message_dialog_new 
+    dialog = gtk_message_dialog_new
       (NULL,
        GTK_DIALOG_MODAL,
        GTK_MESSAGE_ERROR,
        GTK_BUTTONS_CLOSE,
        _("You must select some available content for publication first!"));
     gtk_dialog_run(GTK_DIALOG(dialog));
-    gtk_widget_destroy(dialog);      
-    return;    
+    gtk_widget_destroy(dialog);
+    return;
   }
   if (FALSE == gtk_tree_selection_get_selected(selection,
                                               NULL,
@@ -885,15 +885,15 @@
   if (0 == gtk_tree_selection_count_selected_rows(selectionNamespace)) {
    /* IMPROVE-ME: disable the menu item
       as long as this may happen! */
-    dialog = gtk_message_dialog_new 
+    dialog = gtk_message_dialog_new
       (NULL,
        GTK_DIALOG_MODAL,
        GTK_MESSAGE_ERROR,
        GTK_BUTTONS_CLOSE,
        _("You must select some existing namespace content to be updated 
first!"));
     gtk_dialog_run(GTK_DIALOG(dialog));
-    gtk_widget_destroy(dialog);      
-    return;    
+    gtk_widget_destroy(dialog);
+    return;
   }
   if (FALSE == gtk_tree_selection_get_selected(selectionNamespace,
                                               NULL,
@@ -919,7 +919,7 @@
                     next);
   if (OK != enc2hash(next,
                     &cls.thisId)) {
-    BREAK(); 
+    BREAK();
     UNREF(metaXML);
     metaXML = NULL;
     return;
@@ -940,10 +940,10 @@
   }
   if (cls.updateInterval == ECRS_SBLOCK_UPDATE_SPORADIC) {
     gtk_entry_set_text(GTK_ENTRY(nameLine),
-                      ""); 
+                      "");
   } else {
     EncName updateName;
-    
+
     if (OK != FSUI_computeNextId(list->name,
                                 &prevId,
                                 &cls.thisId,
@@ -957,7 +957,7 @@
     hash2enc(&nextId,
             &updateName);
     gtk_entry_set_text(GTK_ENTRY(nameLine),
-                      (const char*) &updateName); 
+                      (const char*) &updateName);
     gtk_entry_set_editable(GTK_ENTRY(nameLine),
                           FALSE);
   }
@@ -996,14 +996,14 @@
       gtk_widget_destroy(dialog);
       UNREF(metaXML);
       metaXML = NULL;
-      dialog = gtk_message_dialog_new 
+      dialog = gtk_message_dialog_new
        (NULL,
         GTK_DIALOG_MODAL,
         GTK_MESSAGE_ERROR,
         GTK_BUTTONS_CLOSE,
         error);
       gtk_dialog_run(GTK_DIALOG(dialog));
-      gtk_widget_destroy(dialog);      
+      gtk_widget_destroy(dialog);
       return;
     }
     hash(identifierName,
@@ -1014,14 +1014,14 @@
                                   "namespaceUpdateMetaDataTreeView",
                                   "namespaceUpdatePreviewImage");
     spin = glade_xml_get_widget(metaXML,
-                               "namespaceUpdateAnonymitySpinButton");    
+                               "namespaceUpdateAnonymitySpinButton");
     cls.anonymityLevel
       = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin));
 
     gtk_tree_selection_selected_foreach
       (selection,
        &initiateUpload,
-       &cls);    
+       &cls);
     ECRS_freeMetaData(cls.meta);
   }
   gtk_widget_destroy(dialog);
@@ -1072,7 +1072,7 @@
     = glade_xml_get_widget(getMainXML(),
                           "availableContentList");
 
-  model = gtk_list_store_new(NAMESPACE_NUM, 
+  model = gtk_list_store_new(NAMESPACE_NUM,
                             G_TYPE_STRING, /* name */
                             G_TYPE_UINT64, /* size */
                             G_TYPE_STRING, /* uri-string */
@@ -1100,7 +1100,7 @@
                                              _("URI"),
                                              renderer,
                                              "text", NAMESPACE_URISTRING,
-                                             NULL);    
+                                             NULL);
   addCronJob(&updateContentList,
             0,
             UPDATE_CONTENT_LIST_FREQUENCY,
@@ -1139,7 +1139,7 @@
     pos = head->next;
     FREE(head->name);
     ECRS_freeMetaData(head->meta);
-    
+
     if (gtk_tree_model_get_iter_first(head->model,
                                      &iter)) {
       do {
@@ -1152,7 +1152,7 @@
                           &iter,
                           IN_NAMESPACE_URI, NULL,
                           IN_NAMESPACE_META, NULL,
-                          -1);  
+                          -1);
        if (u != NULL)
          ECRS_freeUri(u);
        if (m != NULL)

Modified: gnunet-gtk/src/plugins/fs/search.c
===================================================================
--- gnunet-gtk/src/plugins/fs/search.c  2005-08-31 21:39:47 UTC (rev 2037)
+++ gnunet-gtk/src/plugins/fs/search.c  2005-08-31 21:40:52 UTC (rev 2038)
@@ -68,7 +68,7 @@
   unsigned char * thumb;
   size_t ts;
   GdkPixbuf * pixbuf;
-  GdkPixbufLoader * loader;    
+  GdkPixbufLoader * loader;
   unsigned long long size;
 
   mime = ECRS_getFromMetaData(meta,
@@ -98,11 +98,11 @@
                                   EXTRACTOR_UNKNOWN,
                                   -1);
   if (name == NULL)
-    name = STRDUP(_("no name given")); 
+    name = STRDUP(_("no name given"));
   if (ECRS_isFileUri(uri)) {
     size = ECRS_fileSize(uri);
   } else {
-    size = 0;  
+    size = 0;
   }
   thumb = NULL;
   ts = ECRS_getThumbnailFromMetaData(meta,
@@ -112,7 +112,7 @@
     gdk_pixbuf_loader_write(loader,
                            (const guchar*) thumb,
                            ts,
-                           NULL);    
+                           NULL);
     pixbuf = gdk_pixbuf_loader_get_pixbuf(loader);
     gdk_pixbuf_loader_close(loader,
                            NULL);
@@ -137,7 +137,7 @@
   FREE(name);
   FREENONNULL(thumb);
 }
-                         
+                       
 
 GtkWidget * getAnonymityButtonFromTM(GtkTreeModel * model) {
   SearchList * list;
@@ -155,7 +155,7 @@
 /**
  * Recursively free the (internal) model data fields
  * (uri and meta) from the search tree model.
- */ 
+ */
 static void freeIterSubtree(GtkTreeModel * tree,
                            GtkTreeIter * iter) {
   GtkTreeIter child;
@@ -185,8 +185,8 @@
       freeIterSubtree(tree, &child);
   } while (gtk_tree_model_iter_next(tree,
                                    iter));
-    
-                                
+
+                               
 }
 
 /**
@@ -203,7 +203,7 @@
   char * description;
   int rating;
   int newrating;
-  
+
   spin
     = glade_xml_get_widget(getMainXML(),
                           "namespaceRatingSpinButton");
@@ -212,13 +212,13 @@
                           "searchNamespaceComboBoxEntry");
   model = gtk_combo_box_get_model(GTK_COMBO_BOX(ncbe));
   if (TRUE == gtk_combo_box_get_active_iter(GTK_COMBO_BOX(ncbe),
-                                           &iter)) {   
+                                           &iter)) {
     gtk_tree_model_get(model,
                       &iter,
                       NS_SEARCH_DESCRIPTION, &description,
                       NS_SEARCH_ENCNAME, &encStr,
                       NS_SEARCH_RATING, &rating,
-                      -1);    
+                      -1);
     if ( (description != NULL) &&
         (0 == strcmp(description,
                      _("globally"))) ) {
@@ -241,16 +241,16 @@
                           &iter,
                           NS_SEARCH_RATING, rating,
                           -1);
-      }      
-    }   
+      }
+    }
   } else {
-    /* FIXME: if enc2hash succeeds, we may want to keep this 
+    /* FIXME: if enc2hash succeeds, we may want to keep this
        active */
     gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin),
                              0);
     gtk_widget_set_sensitive(spin,
                             FALSE);
-  }  
+  }
 }
 
 /**
@@ -327,7 +327,7 @@
                              GtkWidget * treeview) {
   GtkTreeStore * tree;
   GtkTreeIter iter;
-  
+
   tree = GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)));
   if (! gtk_tree_model_get_iter_first(GTK_TREE_MODEL(tree),
                                      &iter))
@@ -359,13 +359,13 @@
     path = gtk_tree_row_reference_get_path(row);
   model = GTK_TREE_STORE
     (gtk_tree_view_get_model
-     (GTK_TREE_VIEW(treeview))); 
+     (GTK_TREE_VIEW(treeview)));
   if (path != NULL) {
     gtk_tree_model_get_iter(GTK_TREE_MODEL(model),
                            &parent,
                            path);
     pparent = &parent;
-  } else      
+  } else
     pparent = NULL;
   gtk_tree_store_insert(model,
                        &iter,
@@ -387,10 +387,10 @@
  */
 void displaySearchResult(const ECRS_FileInfo * info,
                         const struct ECRS_URI * uri,
-                        GtkTreeRowReference * row) {  
+                        GtkTreeRowReference * row) {
   SearchList * list;
   struct ECRS_URI * euri;
-  unsigned int count;    
+  unsigned int count;
   GtkTreeIter iter;
 
   list = head;
@@ -407,13 +407,13 @@
   addSearchResultToModel(info,
                         list->treeview,
                         row);
-  
+
   if (! gtk_tree_model_get_iter_first(GTK_TREE_MODEL(summary),
                                      &iter)) {
     BREAK();
     return;
   }
-  
+
   do { 
     gtk_tree_model_get(GTK_TREE_MODEL(summary),
                       &iter,
@@ -454,10 +454,10 @@
     prev = list;
     list = list->next;
   }
-  
+
   if (list == NULL)
        return;
-  
+
   uri = list->uri;
   FSUI_stopSearch(ctx,
                  uri);
@@ -466,7 +466,7 @@
   else
     prev->next = list->next;
   FREE(list);
-  
+
   notebook
     = glade_xml_get_widget(getMainXML(),
                           "downloadNotebook");
@@ -519,7 +519,7 @@
 
   searchXML
     = glade_xml_new(getGladeFileName(),
-                   "searchResultsFrame", 
+                   "searchResultsFrame",
                    PACKAGE_NAME);
   connectGladeWithPlugins(searchXML);
   window = glade_xml_get_widget(searchXML,
@@ -534,8 +534,8 @@
     gtk_tree_store_new(SEARCH_NUM,
                       G_TYPE_STRING, /* name */
                       G_TYPE_UINT64,  /* size */
-                      G_TYPE_STRING, /* mime-type */ 
-                      G_TYPE_STRING, /* meta-data (some) */   
+                      G_TYPE_STRING, /* mime-type */
+                      G_TYPE_STRING, /* meta-data (some) */
                       GDK_TYPE_PIXBUF, /* preview */   
                       G_TYPE_POINTER,  /* url */
                       G_TYPE_POINTER,  /* meta */
@@ -547,7 +547,7 @@
                                              -1,
                                              _("Name"),
                                              renderer,
-                                             "text", SEARCH_NAME, 
+                                             "text", SEARCH_NAME,
                                              NULL);
   renderer = gtk_cell_renderer_text_new();
   gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(resultList),
@@ -652,7 +652,7 @@
 
     if ( (descStr != NULL) &&
         (0 == strcmp(descStr,
-                     _("globally"))) ) {   
+                     _("globally"))) ) {
       ns = NULL;
     } else {
       GNUNET_ASSERT(strlen(ns) == sizeof(EncName) - 1);
@@ -660,7 +660,7 @@
        descStr = ns;
     }
   }
-  if (ns != NULL) {    
+  if (ns != NULL) {
     char * ustring;
 
     ustring = MALLOC(strlen(ss) + sizeof(EncName) +
@@ -679,9 +679,9 @@
     }
     FREE(ustring);
   } else {
-    uri = FSUI_parseCharKeywordURI(ss);   
+    uri = FSUI_parseCharKeywordURI(ss);
   }
-  if (uri == NULL) 
+  if (uri == NULL)
     return;
   if (ns == NULL) {
     tabtxt = STRDUP(ss);
@@ -701,7 +701,7 @@
   pages = gtk_notebook_get_n_pages(GTK_NOTEBOOK(notebook));
   while (list != NULL) {
     if (ECRS_equalsUri(list->uri,
-                      uri)) {      
+                      uri)) {
       for (i=0;i<pages;i++) {
        page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),
                                         i);
@@ -722,7 +722,7 @@
   list->searchpage
     = makeResultFrame(&list->treeview,
                      &spin);
-  list->next 
+  list->next
     = head;
   list->uri
     = uri;
@@ -768,7 +768,7 @@
   struct ECRS_MetaData * dmd;
   char * desc;
   size_t n;
-  
+
   hash2enc(namespaceId,
           &enc);
   if (md == NULL) {
@@ -792,7 +792,7 @@
     if (desc == NULL)
       desc = STRDUP("");
   }
-  
+
   n = strlen(desc) + 64;
   name = MALLOC(n);
   SNPRINTF(name,
@@ -810,7 +810,7 @@
                     NS_SEARCH_METADATA, dmd,
                     NS_SEARCH_RATING, rating,
                     -1);
-  FREE(name);     
+  FREE(name);
   return OK;
 }
 
@@ -822,8 +822,8 @@
   GtkWidget * searchNamespaceCB;
   GtkListStore * model;
   GtkTreeIter iter;
- 
-  model = gtk_list_store_new(NS_SEARCH_NUM, 
+
+  model = gtk_list_store_new(NS_SEARCH_NUM,
                             G_TYPE_STRING, /* what we show */
                             G_TYPE_STRING, /* EncName of namespace */
                             G_TYPE_POINTER,
@@ -834,7 +834,7 @@
                     &iter,
                     NS_SEARCH_DESCRIPTION, _("globally"),
                     NS_SEARCH_ENCNAME, NULL,
-                    NS_SEARCH_METADATA, NULL,               
+                    NS_SEARCH_METADATA, NULL,          
                     NS_SEARCH_RATING, 0,
                     -1);
   FSUI_listNamespaces(ctx,
@@ -891,7 +891,7 @@
   else if (0 == strncmp(dhead,
                        ECRS_SUBSPACE_INFIX,
                        strlen(ECRS_SUBSPACE_INFIX)))
-    dhead = &dhead[strlen(ECRS_SUBSPACE_INFIX)];    
+    dhead = &dhead[strlen(ECRS_SUBSPACE_INFIX)];
   label = gtk_label_new(dhead);
 
   gtk_list_store_append(summary,
@@ -944,7 +944,7 @@
     = glade_xml_get_widget(getMainXML(),
                           "fssearchKeywordComboBoxEntry");
 
-  model = gtk_list_store_new(NS_SEARCH_NUM, 
+  model = gtk_list_store_new(NS_SEARCH_NUM,
                             G_TYPE_STRING, /* what we show */
                             G_TYPE_STRING, /* EncName of namespace */
                             G_TYPE_POINTER,
@@ -1017,7 +1017,7 @@
                           &iter,
                           SEARCH_URI, NULL,
                           SEARCH_META, NULL,
-                          -1);  
+                          -1);
        if (u != NULL)
          ECRS_freeUri(u);
        if (m != NULL)
@@ -1045,7 +1045,7 @@
                         -1);
     } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary),
                                      &iter));
-  }  
+  }
 }
 
 /* end of search.c */

Modified: gnunet-gtk/src/plugins/fs/upload.c
===================================================================
--- gnunet-gtk/src/plugins/fs/upload.c  2005-08-31 21:39:47 UTC (rev 2037)
+++ gnunet-gtk/src/plugins/fs/upload.c  2005-08-31 21:40:52 UTC (rev 2038)
@@ -44,7 +44,7 @@
 
 /**
  * XML tree for the meta-data dialog of upload.
- * (there can only be one at a time; 
+ * (there can only be one at a time;
  * maybe NULL at times where there is no dialog)
  */
 static GladeXML * metaXML;
@@ -77,7 +77,7 @@
                           &iter,
                           UPLOAD_PROGRESS, progress,
                           -1);
-       return;     
+       return;
       }
       if (0 == strcmp(name, mainName)) {
        if (gtk_tree_model_iter_children(GTK_TREE_MODEL(summary),
@@ -96,7 +96,7 @@
              return;
            }
          } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary),
-                                           &child));     
+                                           &child));   
        }
        gtk_tree_store_append(GTK_TREE_STORE(summary),
                              &child,
@@ -108,7 +108,7 @@
                           UPLOAD_URISTRING, NULL,
                           -1);
        return;
-      }    
+      }
     } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary),
                                      &iter));
   }
@@ -171,7 +171,7 @@
                           UPLOAD_URISTRING, us,
                           -1);
        FREE(us);
-       return;     
+       return;
       }
       if (0 == strcmp(name, mainName)) {
        if (gtk_tree_model_iter_children(GTK_TREE_MODEL(summary),
@@ -192,7 +192,7 @@
              return;
            }
          } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary),
-                                           &child));     
+                                           &child));   
        }
        gtk_tree_store_append(GTK_TREE_STORE(summary),
                              &child,
@@ -205,7 +205,7 @@
                           -1);
        FREE(us);
        return;
-      }    
+      }
     } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(summary),
                                      &iter));
   }
@@ -303,12 +303,12 @@
                                               config);
     FREE(config);
   }
-    
+
   uploadLine = glade_xml_get_widget(getMainXML(),
                                    "uploadFilenameComboBoxEntry");
   entry = gtk_bin_get_child(GTK_BIN(uploadLine));
   filename = gtk_entry_get_text(GTK_ENTRY(entry));
-  
+
   metaXML
     = glade_xml_new(getGladeFileName(),
                    "metaDataDialog",
@@ -345,7 +345,7 @@
   if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) {
     int doIndex;
     int doRec;
-    
+
     addLogEntry(_("Uploading `%s'"), filenamerest);
 
     recBut = glade_xml_get_widget(getMainXML(),
@@ -363,18 +363,18 @@
 
     meta = getMetaDataFromList(metaXML,
                               "metaDataDialogMetaDataList",
-                              "previewImage");   
+                              "previewImage");
     keywordURI = getKeywordURIFromList(metaXML,
                                       "metaDataDialogKeywordList");
     if (doRec) {
       deepIndex = glade_xml_get_widget(getMainXML(),
                                       "deepIndexCheckButton");
       gkeywordURI = ECRS_stringToUri(ECRS_URI_PREFIX
-                                    ECRS_SEARCH_INFIX);      
+                                    ECRS_SEARCH_INFIX);
       FSUI_uploadAll(ctx,
                     filename,
                     getAnonymityLevel(getMainXML(),
-                                      "uploadAnonymityLevelSpinButton"),    
+                                      "uploadAnonymityLevelSpinButton"),
                     doIndex,
                     (TRUE == 
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(deepIndex)))
                     ? YES : NO,
@@ -385,7 +385,7 @@
       FSUI_upload(ctx,
                  filename,
                  getAnonymityLevel(getMainXML(),
-                                   "uploadAnonymityLevelSpinButton"),    
+                                   "uploadAnonymityLevelSpinButton"),
                  doIndex,
                  NO,
                  meta,
@@ -416,14 +416,14 @@
 
   recBut = glade_xml_get_widget(getMainXML(),
                                "scopeRecursiveButton");
-  
+
   if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(recBut)))
     gtk_file_chooser_set_action(GTK_FILE_CHOOSER(dialog),
                                GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
-  
+
   if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_CANCEL) {
     char * filename;
-    
+
     filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
     ret = STRDUP(filename);
     g_free(filename);
@@ -445,7 +445,7 @@
   else
     fn = plibc_ChooseDir(_("Choose the directory you want to publish."),
                         BIF_USENEWUI | BIF_SHAREABLE | BIF_NONEWFOLDERBUTTON);
-       
+
   return fn;
 #endif /* MINGW */
 }
@@ -457,7 +457,7 @@
   GtkWidget * entry;
   GtkListStore * model;
   GtkTreeIter iter;
-  
+
   if ((filename = selectFile())) {
     uploadLine = glade_xml_get_widget(getMainXML(),
                                      "uploadFilenameComboBoxEntry");
@@ -492,7 +492,7 @@
                       G_TYPE_STRING);  /* URI (as string) - after completion */
   gtk_tree_view_set_model(GTK_TREE_VIEW(uploadList),
                          GTK_TREE_MODEL(summary));
-  renderer = gtk_cell_renderer_progress_new();  
+  renderer = gtk_cell_renderer_progress_new();
   gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(uploadList),
                                              -1,
                                              _("Filename"),

Modified: gnunet-gtk/src/plugins/stats/functions.c
===================================================================
--- gnunet-gtk/src/plugins/stats/functions.c    2005-08-31 21:39:47 UTC (rev 
2037)
+++ gnunet-gtk/src/plugins/stats/functions.c    2005-08-31 21:40:52 UTC (rev 
2038)
@@ -60,7 +60,7 @@
       if (dtime != NULL)
        *dtime = lastStatValues[i].delta;
       return OK;
-    }      
+    }
   }
 #if FUNCTIONS_DEBUG
   LOG(LOG_DEBUG,
@@ -86,7 +86,7 @@
                                            "LOAD",
                                            "MAXNETUPBPSTOTAL");
   MUTEX_UNLOCK(&lock);
-  if (cmh == NULL) 
+  if (cmh == NULL)
     connectionGoal = 0;
   else
     connectionGoal = atol(cmh);
@@ -113,7 +113,7 @@
   if (OK != getStatValue(&val,
                         NULL,
                         NULL,
-                        "# of connected peers")) 
+                        "# of connected peers"))
     return SYSERR;
   data[0][0] = 0.8 * val / connectionGoal;
   return OK;
@@ -158,7 +158,7 @@
     return SYSERR;
   i = 0;
   buffer = MALLOC(512);
-  SNPRINTF(buffer, 
+  SNPRINTF(buffer,
           512,
           "# bytes received of type %d",
           P2P_PROTO_gap_RESULT);
@@ -167,10 +167,10 @@
                         NULL,
                         buffer)) {
     content += 0;
-    lcontent += 0;    
+    lcontent += 0;
   }
   i = 0;
-  SNPRINTF(buffer, 
+  SNPRINTF(buffer,
           512,
            "# bytes received of type %d",
           P2P_PROTO_gap_QUERY);
@@ -180,10 +180,10 @@
                         buffer)) {
     queries = 0;
     lqueries = 0;
-  }  
+  }
   FREE(buffer);
   if (banddown == 0)
-    return SYSERR; 
+    return SYSERR;
 
   total -= ltotal;
   noise -= lnoise;
@@ -200,7 +200,7 @@
   data[0][1] = 0.8 * (content+noise) / (banddown * dtime / cronSECONDS); /* 
green */
   data[0][2] = 0.8 * (queries+content+noise) / (banddown * dtime / 
cronSECONDS); /* yellow */
   data[0][3] = 0.8 * total / (banddown * dtime / cronSECONDS); /* blue */
-  /*printf("I: %f %f %f\n", 
+  /*printf("I: %f %f %f\n",
         data[0][0],
         data[0][1],
         data[0][2]);*/
@@ -234,7 +234,7 @@
     return SYSERR;
   i = 0;
   buffer = MALLOC(512);
-  SNPRINTF(buffer, 
+  SNPRINTF(buffer,
           512,
            "# bytes transmitted of type %d",
           P2P_PROTO_gap_RESULT);
@@ -243,10 +243,10 @@
                         NULL,
                         buffer)) {
     content = 0;
-    lcontent = 0;  
+    lcontent = 0;
   }
   i = 0;
-  SNPRINTF(buffer, 
+  SNPRINTF(buffer,
           512,
            "# bytes received of type %d",
           P2P_PROTO_gap_QUERY);
@@ -255,7 +255,7 @@
                         NULL,
                         buffer)) {
     queries = 0;
-    lqueries = 0;  
+    lqueries = 0;
   }
   FREE(buffer);
   if (bandup == 0)
@@ -275,10 +275,10 @@
   data[0][1] = 0.8 * (noise + content) / (bandup*dtime / cronSECONDS); /* 
green */
   data[0][2] = 0.8 * (noise + content + queries) / (bandup*dtime / 
cronSECONDS); /* yellow */
   data[0][3] = 0.8 * total / (bandup*dtime / cronSECONDS); /* yellow */
-  /* printf("O: %f %f %f\n", 
+  /* printf("O: %f %f %f\n",
      data[0][0],
      data[0][1],
-        data[0][2]);*/ 
+        data[0][2]);*/
   return OK;
 }
 
@@ -291,7 +291,7 @@
   int found;
 
   found = -1;
-  for (j=0;j<lsv_size;j++) 
+  for (j=0;j<lsv_size;j++)
     if (0 == strcmp(optName,
                    lastStatValues[j].statName))
       found = j;
@@ -310,7 +310,7 @@
   lastStatValues[found].delta
     = *delta;
   return OK;
-} 
+}
 
 /**
  * Cron-job that updates all stat values.
@@ -325,22 +325,22 @@
   MUTEX_LOCK(&lock);
   if (OK == requestStatistics(sock,
                              &statsProcessor,
-                             &delta)) 
-    lastUpdate = now;  
+                             &delta))
+    lastUpdate = now;
   MUTEX_UNLOCK(&lock);
 }
 
 
 StatEntry stats[] = {
- { 
+ {
     gettext_noop("Connectivity"),
     gettext_noop("# connected nodes (100% = connection table size)"),
     &getConnectedNodesStat,
     NULL,
     1,
     NO,
-  }, 
-  { 
+  },
+  {
     gettext_noop("CPU load"),
     gettext_noop("CPU load (in percent of allowed load)"),
     &getCPULoadStat,
@@ -348,7 +348,7 @@
     1,
     NO,
   },
-  { 
+  {
     gettext_noop("Inbound Traffic"),
     gettext_noop("Noise (red), Content (green), Queries (yellow), other 
(blue)"),
     &getTrafficRecvStats,
@@ -356,7 +356,7 @@
     4,
     YES,
   },
-  { 
+  {
     gettext_noop("Outbound Traffic"),
     gettext_noop("Noise (red), Content (green), Queries (yellow), other 
(blue)"),
     &getTrafficSendStats,
@@ -377,7 +377,7 @@
 int UPDATE_INTERVAL;
 
 void init_functions() {
-  UPDATE_INTERVAL 
+  UPDATE_INTERVAL
     = getConfigurationInt("GNUNET-GTK",
                          "STATS-INTERVAL") * cronSECONDS;
   if (UPDATE_INTERVAL == 0)
@@ -414,5 +414,5 @@
   sock = NULL;
 }
 
- 
+
 /* end of functions.c */

Modified: gnunet-gtk/src/plugins/stats/statistics.c
===================================================================
--- gnunet-gtk/src/plugins/stats/statistics.c   2005-08-31 21:39:47 UTC (rev 
2037)
+++ gnunet-gtk/src/plugins/stats/statistics.c   2005-08-31 21:40:52 UTC (rev 
2038)
@@ -37,8 +37,8 @@
   guint count;
   guint speed;
   guint draw_width, draw_height;
-  guint num_points; 
-  guint allocated;  
+  guint num_points;
+  guint allocated;
   GdkColor *colors;
   gfloat **data, **odata;
   guint data_size;
@@ -48,7 +48,7 @@
   GtkWidget *label;
   GdkPixmap *pixmap;
   GdkGC *gc;
-  int timer_index;  
+  int timer_index;
   gboolean draw;
   int statIdx;
 } LoadGraph;
@@ -60,39 +60,39 @@
 } ProcConfig;
 
 /**
- * Redraws the backing pixmap for the load graph and updates the window 
+ * Redraws the backing pixmap for the load graph and updates the window
  */
 static void load_graph_draw(LoadGraph *g) {
   guint i;
   guint j;
   gint dely;
   float delx;
-  
+
   if (!g->disp->window)
     return;
-  
+
   g->draw_width = g->disp->allocation.width;
   g->draw_height = g->disp->allocation.height;
-  
+
   if (!g->pixmap)
     g->pixmap = gdk_pixmap_new (g->disp->window,
                                g->draw_width, g->draw_height,
                                gtk_widget_get_visual (g->disp)->depth);
-  
+
   /* Create GC if necessary. */
   if (!g->gc) {
     g->gc = gdk_gc_new (g->disp->window);
     gdk_gc_copy (g->gc, g->disp->style->white_gc);
   }
-  
+
   /* Allocate colors. */
   if (!g->colors_allocated) {
     GdkColormap *colormap;
-    
+
     colormap = gdk_window_get_colormap (g->disp->window);
-    for (i=0;i<2+g->count;i++) 
-      gdk_color_alloc (colormap, &(g->colors [i]));    
-    
+    for (i=0;i<2+g->count;i++)
+      gdk_color_alloc (colormap, &(g->colors [i]));
+
     g->colors_allocated = 1;
   }
   /* Erase Rectangle */
@@ -102,7 +102,7 @@
                      TRUE, 0, 0,
                      g->disp->allocation.width,
                      g->disp->allocation.height);
-  
+
   /* draw frame */
   gdk_gc_set_foreground (g->gc, &(g->colors [1]));
   gdk_draw_rectangle (g->pixmap,
@@ -110,39 +110,39 @@
                      FALSE, 0, 0,
                      g->draw_width,
                      g->disp->allocation.height);
-  
+
   dely = g->draw_height / 5;
   for (i = 1; i <5; i++) {
     gint y1 = g->draw_height + 1 - i * dely;
     gdk_draw_line (g->pixmap, g->gc,
                   0, y1, g->draw_width, y1);
   }
-  
+
   gdk_gc_set_line_attributes(g->gc,
-                            2, 
-                            GDK_LINE_SOLID, 
-                            GDK_CAP_ROUND, 
+                            2,
+                            GDK_LINE_SOLID,
+                            GDK_CAP_ROUND,
                             GDK_JOIN_MITER);
   delx = (float)g->draw_width / ( g->num_points - 1);
-  
+
   for (j=0;j<g->count;j++) {
     gdk_gc_set_foreground (g->gc, &(g->colors [j + 2]));
-    for (i = 0; i < g->num_points - 1; i++) {    
+    for (i = 0; i < g->num_points - 1; i++) {
       gint x1 = i * delx;
       gint x2 = (i + 1) * delx;
       gint y1 = g->data[i][j] * g->draw_height - 1;
       gint y2 = g->data[i+1][j] * g->draw_height - 1;
-      
+
       if ((g->data[i][j] != -1) && (g->data[i+1][j] != -1)) {
        if (stats[g->statIdx].fill == NO) {
          gdk_draw_line(g->pixmap, g->gc,
-                       g->draw_width - x2, 
+                       g->draw_width - x2,
                        g->draw_height - y2,
                        g->draw_width - x1,
                        g->draw_height - y1);
        } else {
          GdkPoint points[4];
-         
+       
          points[0].x = g->draw_width - x2;
          points[0].y = g->draw_height - y2;
          points[1].x = g->draw_width - x1;
@@ -162,17 +162,17 @@
                           g->gc,
                           1,
                           points,
-                          4);  
+                          4);
        }
       }
     }
   }
 
-  gdk_gc_set_line_attributes (g->gc, 1, 
+  gdk_gc_set_line_attributes (g->gc, 1,
                              GDK_LINE_SOLID,
                              GDK_CAP_ROUND,
                              GDK_JOIN_MITER );
-  
+
   gdk_draw_pixmap (g->disp->window,
                   g->disp->style->fg_gc [GTK_WIDGET_STATE(g->disp)],
                   g->pixmap,
@@ -186,20 +186,20 @@
 /* Updates the load graph when the timeout expires */
 static gboolean load_graph_update(gpointer ptr) {
   LoadGraph *g = ptr;
-  guint i;  
+  guint i;
   guint j;
 
   for (i=0;i<g->num_points;i++)
-    memcpy(g->odata[i], 
+    memcpy(g->odata[i],
           g->data[i],
-          g->data_size * g->count); 
+          g->data_size * g->count);
   stats[g->statIdx].getData(stats[g->statIdx].get_closure,
                            g->data);
   for (i=0;i<g->num_points-1;i++)
     for (j=0;j<g->count;j++)
-      g->data[i+1][j] = g->odata[i][j];  
+      g->data[i+1][j] = g->odata[i][j];
   if (g->draw)
-    load_graph_draw (g);  
+    load_graph_draw (g);
   return TRUE;
 }
 
@@ -227,30 +227,30 @@
 
   if (g->allocated)
     return;
-  
+
   g->data = MALLOC(sizeof(gfloat *) * g->num_points);
   g->odata = MALLOC(sizeof(gfloat*) * g->num_points);
-  g->data_size = sizeof (gfloat);  
+  g->data_size = sizeof (gfloat);
   for (i = 0; i < g->num_points; i++) {
     g->data[i] = MALLOC(g->data_size * g->count);
     g->odata[i] = MALLOC(g->data_size * g->count);
-  }  
-  for (i=0;i<g->num_points;i++) 
+  }
+  for (i=0;i<g->num_points;i++)
     for (j=0;j<g->count;j++)
       g->data[i][j] = -1;
   g->allocated = TRUE;
 }
 
-static gint load_graph_configure(GtkWidget *widget, 
+static gint load_graph_configure(GtkWidget *widget,
                                 GdkEventConfigure *event,
                                 gpointer data_ptr) {
   LoadGraph *c = (LoadGraph *) data_ptr;
-  
+
   if (c->pixmap) {
     gdk_pixmap_unref (c->pixmap);
     c->pixmap = NULL;
   }
-  
+
   if (!c->pixmap)
     c->pixmap = gdk_pixmap_new(widget->window,
                               widget->allocation.width,
@@ -267,9 +267,9 @@
                  0, 0,
                  0, 0,
                  c->disp->allocation.width,
-                 c->disp->allocation.height);  
+                 c->disp->allocation.height);
 
-  load_graph_draw(c); 
+  load_graph_draw(c);
   return TRUE;
 }
 
@@ -277,7 +277,7 @@
                              GdkEventExpose *event,
                              gpointer data_ptr) {
   LoadGraph *g = (LoadGraph *) data_ptr;
-  
+
   gdk_draw_pixmap(widget->window,
                  widget->style->fg_gc [GTK_WIDGET_STATE(widget)],
                  g->pixmap,
@@ -297,10 +297,10 @@
   g->draw = FALSE;
 }
 
-static void load_graph_destroy(GtkWidget *widget, 
+static void load_graph_destroy(GtkWidget *widget,
                               gpointer data_ptr) {
-  LoadGraph *g = (LoadGraph *) data_ptr;  
-  load_graph_stop(g);  
+  LoadGraph *g = (LoadGraph *) data_ptr;
+  load_graph_stop(g);
   if (g->timer_index != -1)
     gtk_timeout_remove (g->timer_index);
   load_graph_unalloc(g);
@@ -317,7 +317,7 @@
     BREAK();
     return NULL;
   }
-  
+
   g = MALLOC(sizeof(LoadGraph));
   g->statIdx = statIdx;
   g->count = stats[statIdx].count;
@@ -325,8 +325,8 @@
   g->num_points = 600;
   g->colors = MALLOC(sizeof(GdkColor) * (2+g->count));
   g->colors[0] = config->bg_color;
-  g->colors[1] = config->frame_color;  
-  for (i=0;i<g->count;i++) 
+  g->colors[1] = config->frame_color;
+  for (i=0;i<g->count;i++)
     g->colors[2+i] = config->mem_color[i];
   g->timer_index = -1;
   g->draw = FALSE;
@@ -337,24 +337,24 @@
   gtk_signal_connect(GTK_OBJECT (g->disp),
                     "expose_event",
                     GTK_SIGNAL_FUNC (load_graph_expose), g);
-  gtk_signal_connect(GTK_OBJECT(g->disp), 
+  gtk_signal_connect(GTK_OBJECT(g->disp),
                     "configure_event",
                     GTK_SIGNAL_FUNC (load_graph_configure), g);
   gtk_signal_connect(GTK_OBJECT(g->disp),
                     "destroy",
-                    GTK_SIGNAL_FUNC (load_graph_destroy), g); 
-  gtk_widget_add_events(g->disp, 
+                    GTK_SIGNAL_FUNC (load_graph_destroy), g);
+  gtk_widget_add_events(g->disp,
                        GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
-  gtk_box_pack_start(GTK_BOX(g->main_widget), 
-                    g->disp, 
-                    TRUE, 
+  gtk_box_pack_start(GTK_BOX(g->main_widget),
+                    g->disp,
                     TRUE,
+                    TRUE,
                     0);
-  load_graph_alloc(g);  
-  gtk_widget_show_all(g->main_widget);  
+  load_graph_alloc(g);
+  gtk_widget_show_all(g->main_widget);
   g->timer_index = gtk_timeout_add(g->speed,
                                   &load_graph_update, g);
-  
+
   return g;
 }
 
@@ -395,12 +395,12 @@
   ProcConfig config;
   int i;
 
-  init_functions(); 
+  init_functions();
   notebook
     = glade_xml_get_widget(getMainXML(),
                           "statsNotebook");
   memset(&config,
-        0, 
+        0,
         sizeof(ProcConfig));
   gdk_color_parse("black",
                  &config.bg_color);
@@ -419,14 +419,14 @@
   while (stats[++i].paneName != NULL) {
     sys_box = create_sys_view(i,
                              &config);
-    if (sys_box == NULL) 
+    if (sys_box == NULL)
       continue; /* oops */
-    
+
     label = gtk_label_new(gettext(stats[i].paneName));
     gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
                             sys_box,
                             label);
-  } 
+  }
   gtk_widget_show(notebook);
 }
 
@@ -434,5 +434,5 @@
   done_functions();
 }
 
- 
+
 /* end of statistics.c */





reply via email to

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