gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r5743 - in gnunet-gtk: libltdl po src/common src/core src/i


From: gnunet
Subject: [GNUnet-SVN] r5743 - in gnunet-gtk: libltdl po src/common src/core src/include src/plugins/daemon src/plugins/fs src/plugins/fs/extensions src/plugins/peers src/plugins/stats
Date: Fri, 23 Nov 2007 04:57:36 -0700 (MST)

Author: grothoff
Date: 2007-11-23 04:57:34 -0700 (Fri, 23 Nov 2007)
New Revision: 5743

Modified:
   gnunet-gtk/libltdl/ltdl.c
   gnunet-gtk/libltdl/ltdl.h
   gnunet-gtk/po/de.gmo
   gnunet-gtk/po/de.po
   gnunet-gtk/po/fr.gmo
   gnunet-gtk/po/fr.po
   gnunet-gtk/po/gnunet-gtk.pot
   gnunet-gtk/po/rw.gmo
   gnunet-gtk/po/rw.po
   gnunet-gtk/po/sv.gmo
   gnunet-gtk/po/sv.po
   gnunet-gtk/po/tr.gmo
   gnunet-gtk/po/tr.po
   gnunet-gtk/po/vi.gmo
   gnunet-gtk/po/vi.po
   gnunet-gtk/src/common/Makefile.am
   gnunet-gtk/src/common/helper.c
   gnunet-gtk/src/common/iterators.c
   gnunet-gtk/src/common/logging.c
   gnunet-gtk/src/core/Makefile.am
   gnunet-gtk/src/core/eggtrayicon.c
   gnunet-gtk/src/core/main.c
   gnunet-gtk/src/include/gettext.h
   gnunet-gtk/src/include/gnunetgtk_common.h
   gnunet-gtk/src/include/platform.h
   gnunet-gtk/src/plugins/daemon/Makefile.am
   gnunet-gtk/src/plugins/daemon/daemon.c
   gnunet-gtk/src/plugins/fs/Makefile.am
   gnunet-gtk/src/plugins/fs/collection.c
   gnunet-gtk/src/plugins/fs/content_tracking.c
   gnunet-gtk/src/plugins/fs/content_tracking.h
   gnunet-gtk/src/plugins/fs/directory.c
   gnunet-gtk/src/plugins/fs/download.c
   gnunet-gtk/src/plugins/fs/download.h
   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/helper.h
   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/namespace.h
   gnunet-gtk/src/plugins/fs/namespace_create.c
   gnunet-gtk/src/plugins/fs/namespace_search.c
   gnunet-gtk/src/plugins/fs/namespace_search.h
   gnunet-gtk/src/plugins/fs/search.c
   gnunet-gtk/src/plugins/fs/upload.c
   gnunet-gtk/src/plugins/peers/Makefile.am
   gnunet-gtk/src/plugins/peers/peers.c
   gnunet-gtk/src/plugins/stats/Makefile.am
   gnunet-gtk/src/plugins/stats/functions.c
   gnunet-gtk/src/plugins/stats/functions.h
   gnunet-gtk/src/plugins/stats/statistics.c
Log:
big alpha patch

Modified: gnunet-gtk/libltdl/ltdl.c
===================================================================
--- gnunet-gtk/libltdl/ltdl.c   2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/libltdl/ltdl.c   2007-11-23 11:57:34 UTC (rev 5743)
@@ -42,7 +42,7 @@
 #if HAVE_STDLIB_H
 #  include <stdlib.h>
 #else
-#  if HAVE_MALLOC_H
+#  if HAVE_GNUNET_malloc_H
 #    include <malloc.h>
 #  endif
 #endif
@@ -128,7 +128,7 @@
 
 #include "ltdl.h"
 
-#if WITH_DMALLOC
+#if WITH_DGNUNET_malloc
 #  include <dmalloc.h>
 #endif
 
@@ -228,24 +228,24 @@
 
 /* The following macros reduce the amount of typing needed to cast
    assigned memory.  */
-#if WITH_DMALLOC
+#if WITH_DGNUNET_malloc
 
-#define LT_DLMALLOC(tp, n)     ((tp *) xmalloc ((n) * sizeof(tp)))
+#define LT_DLGNUNET_malloc(tp, n)      ((tp *) xmalloc ((n) * sizeof(tp)))
 #define LT_DLREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp)))
-#define LT_DLFREE(p)                                           \
+#define LT_DLGNUNET_free(p)                                            \
        LT_STMT_START { if (p) (p) = (xfree (p), (lt_ptr) 0); } LT_STMT_END
 
-#define LT_EMALLOC(tp, n)      ((tp *) xmalloc ((n) * sizeof(tp)))
+#define LT_EGNUNET_malloc(tp, n)       ((tp *) xmalloc ((n) * sizeof(tp)))
 #define LT_EREALLOC(tp, p, n)  ((tp *) xrealloc ((p), (n) * sizeof(tp)))
 
 #else
 
-#define LT_DLMALLOC(tp, n)     ((tp *) lt_dlmalloc ((n) * sizeof(tp)))
+#define LT_DLGNUNET_malloc(tp, n)      ((tp *) lt_dlmalloc ((n) * sizeof(tp)))
 #define LT_DLREALLOC(tp, p, n) ((tp *) lt_dlrealloc ((p), (n) * sizeof(tp)))
-#define LT_DLFREE(p)                                           \
+#define LT_DLGNUNET_free(p)                                            \
        LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END
 
-#define LT_EMALLOC(tp, n)      ((tp *) lt_emalloc ((n) * sizeof(tp)))
+#define LT_EGNUNET_malloc(tp, n)       ((tp *) lt_emalloc ((n) * sizeof(tp)))
 #define LT_EREALLOC(tp, p, n)  ((tp *) lt_erealloc ((p), (n) * sizeof(tp)))
 
 #endif
@@ -270,7 +270,7 @@
 
   if (str)
     {
-      tmp = LT_DLMALLOC (char, 1 + strlen (str));
+      tmp = LT_DLGNUNET_malloc (char, 1 + strlen (str));
       if (tmp)
         {
           strcpy (tmp, str);
@@ -455,7 +455,7 @@
   assert (path != (char *) NULL);
   (void) strncpy (file_specification, path, LT_FILENAME_MAX - 1);
   (void) strcat (file_specification, "\\");
-  entry = LT_DLMALLOC (DIR, sizeof (DIR));
+  entry = LT_DLGNUNET_malloc (DIR, sizeof (DIR));
   if (entry != (DIR *) 0)
     {
       entry->firsttime = TRUE;
@@ -469,7 +469,7 @@
         FindFirstFile (file_specification, &entry->Win32FindData);
       if (entry->hSearch == INVALID_HANDLE_VALUE)
         {
-          LT_DLFREE (entry);
+          LT_DLGNUNET_free (entry);
           return (DIR *) 0;
         }
     }
@@ -628,7 +628,7 @@
       const char *p;
       char *q;
 
-      argz = LT_DLMALLOC (char, argz_len);
+      argz = LT_DLGNUNET_malloc (char, argz_len);
       if (!argz)
         return ENOMEM;
 
@@ -652,7 +652,7 @@
 
   /* If ARGZ_LEN has shrunk to nothing, release ARGZ's memory.  */
   if (!argz_len)
-    LT_DLFREE (argz);
+    LT_DLGNUNET_free (argz);
 
   /* Assign new values.  */
   *pargz = argz;
@@ -870,7 +870,7 @@
 
 
 
-/* --- MUTEX LOCKING --- */
+/* --- GNUNET_Mutex LOCKING --- */
 
 
 /* Macros to make it easier to run the lock functions only if they have
@@ -878,7 +878,7 @@
    ensure that the stored error message from the last error is not
    accidentally erased if the current function doesn't generate an
    error of its own.  */
-#define LT_DLMUTEX_LOCK()                      LT_STMT_START { \
+#define LT_DLGNUNET_mutex_lock()                       LT_STMT_START { \
        if (lt_dlmutex_lock_func) (*lt_dlmutex_lock_func)();    \
                                                } LT_STMT_END
 #define LT_DLMUTEX_UNLOCK()                    LT_STMT_START { \
@@ -917,7 +917,7 @@
   int errors = 0;
 
   /* Lock using the old lock() callback, if any.  */
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   if ((lock && unlock && seterror && geterror)
       || !(lock || unlock || seterror || geterror))
@@ -961,7 +961,7 @@
 
   assert (diagnostic);
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   errindex = errorcount - LT_ERROR_MAX;
   temp = LT_EREALLOC (const char *, user_error_strings, 1 + errindex);
@@ -983,7 +983,7 @@
 {
   int errors = 0;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   if (errindex >= errorcount || errindex < 0)
     {
@@ -1326,7 +1326,7 @@
     {
       /* Append a `.' to stop Windows from adding an
          implicit `.dll' extension. */
-      searchname = LT_EMALLOC (char, 2 + LT_STRLEN (filename));
+      searchname = LT_EGNUNET_malloc (char, 2 + LT_STRLEN (filename));
       if (searchname)
         sprintf (searchname, "%s.", filename);
     }
@@ -1342,7 +1342,7 @@
 #else
   module = LoadLibrary (searchname);
 #endif
-  LT_DLFREE (searchname);
+  LT_DLGNUNET_free (searchname);
 
   /* libltdl expects this function to fail if it is unable
      to physically load the library.  Sadly, LoadLibrary
@@ -1352,7 +1352,7 @@
      We check whether LoadLibrary is returning a handle to
      an already loaded module, and simulate failure if we
      find one. */
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
   cur = handles;
   while (cur)
     {
@@ -1522,7 +1522,7 @@
   if (dld_link (filename) != 0)
     {
       LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN));
-      LT_DLFREE (module);
+      LT_DLGNUNET_free (module);
       module = 0;
     }
 
@@ -1543,7 +1543,7 @@
     }
   else
     {
-      LT_DLFREE (module);
+      LT_DLGNUNET_free (module);
     }
 
   return errors;
@@ -1982,7 +1982,7 @@
 {
   int errors = 0;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   preloaded_symbols = 0;
   if (default_preloaded_symbols)
@@ -2000,7 +2000,7 @@
 {
   lt_dlsymlists_t *lists;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   lists = preloaded_symbols;
   while (lists)
@@ -2008,7 +2008,7 @@
       lt_dlsymlists_t *tmp = lists;
 
       lists = lists->next;
-      LT_DLFREE (tmp);
+      LT_DLGNUNET_free (tmp);
     }
   preloaded_symbols = 0;
 
@@ -2033,7 +2033,7 @@
   lt_dlsymlists_t *lists;
   int errors = 0;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   lists = preloaded_symbols;
   while (lists)
@@ -2045,7 +2045,7 @@
       lists = lists->next;
     }
 
-  tmp = LT_EMALLOC (lt_dlsymlists_t, 1);
+  tmp = LT_EGNUNET_malloc (lt_dlsymlists_t, 1);
   if (tmp)
     {
       memset (tmp, 0, sizeof (lt_dlsymlists_t));
@@ -2071,7 +2071,7 @@
   lt_dlsymlists_t *lists;
   lt_module module = (lt_module) 0;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
   lists = preloaded_symbols;
 
   if (!lists)
@@ -2225,7 +2225,7 @@
 {
   int errors = 0;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   /* Initialize only at first call. */
   if (++initialized == 1)
@@ -2285,7 +2285,7 @@
     {
       presym_free_symlists ();
 
-      LT_DLMUTEX_LOCK ();
+      LT_DLGNUNET_mutex_lock ();
       if (default_preloaded_symbols)
         {
           errors = lt_dlpreload (default_preloaded_symbols);
@@ -2300,7 +2300,7 @@
 lt_dlpreload_default (preloaded)
      const lt_dlsymlist *preloaded;
 {
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
   default_preloaded_symbols = preloaded;
   LT_DLMUTEX_UNLOCK ();
   return 0;
@@ -2313,7 +2313,7 @@
   lt_dlloader *loader;
   int errors = 0;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
   loader = loaders;
 
   if (!initialized)
@@ -2389,7 +2389,7 @@
   int errors = 0;
 
   LT_DLMUTEX_GETERROR (saved_error);
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   cur = handles;
   loader = loaders;
@@ -2461,7 +2461,7 @@
 
   if (!loader)
     {
-      LT_DLFREE (cur->info.filename);
+      LT_DLGNUNET_free (cur->info.filename);
       ++errors;
       goto done;
     }
@@ -2503,7 +2503,7 @@
 
   /* Allocate memory, and combine DIRNAME and MODULENAME into it.
      The PREFIX (if any) is handled below.  */
-  filename = LT_EMALLOC (char, dirname_len + 1 + filename_len + 1);
+  filename = LT_EGNUNET_malloc (char, dirname_len + 1 + filename_len + 1);
   if (!filename)
     return 1;
 
@@ -2522,7 +2522,7 @@
       ++error;
     }
 
-  LT_DLFREE (filename);
+  LT_DLGNUNET_free (filename);
   return error;
 }
 
@@ -2582,7 +2582,7 @@
   assert (path && *path);
   assert (pcanonical);
 
-  canonical = LT_EMALLOC (char, 1 + LT_STRLEN (path));
+  canonical = LT_EGNUNET_malloc (char, 1 + LT_STRLEN (path));
   if (!canonical)
     return 1;
 
@@ -2685,7 +2685,7 @@
   char *filename = 0;
   char *canonical = 0;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   if (!search_path || !*search_path)
     {
@@ -2707,9 +2707,9 @@
 
         if (lendir + 1 + lenbase >= filenamesize)
           {
-            LT_DLFREE (filename);
+            LT_DLGNUNET_free (filename);
             filenamesize = lendir + 1 + lenbase + 1;    /* "/d" + '/' + "f" + 
'\0' */
-            filename = LT_EMALLOC (char, filenamesize);
+            filename = LT_EGNUNET_malloc (char, filenamesize);
             if (!filename)
               goto cleanup;
           }
@@ -2732,9 +2732,9 @@
   }
 
 cleanup:
-  LT_DLFREE (argz);
-  LT_DLFREE (canonical);
-  LT_DLFREE (filename);
+  LT_DLGNUNET_free (argz);
+  LT_DLGNUNET_free (canonical);
+  LT_DLGNUNET_free (filename);
 
   LT_DLMUTEX_UNLOCK ();
 
@@ -2765,7 +2765,7 @@
       if (dirend > filename)
         *dirend = LT_EOS_CHAR;
 
-      LT_DLFREE (*pdir);
+      LT_DLGNUNET_free (*pdir);
       *pdir = lt_estrdup (filename);
       is_done = (*pdir == 0) ? -1 : 1;
     }
@@ -2847,7 +2847,7 @@
     }
   ++errors;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
   if (user_search_path)
     {
       save_search_path = lt_estrdup (user_search_path);
@@ -2891,7 +2891,7 @@
     }
 
   /* restore the old search path */
-  LT_DLFREE (user_search_path);
+  LT_DLGNUNET_free (user_search_path);
   user_search_path = save_search_path;
 
   LT_DLMUTEX_UNLOCK ();
@@ -2902,7 +2902,7 @@
       goto cleanup;
     }
 
-  names = LT_EMALLOC (char *, depcount * sizeof (char *));
+  names = LT_EGNUNET_malloc (char *, depcount * sizeof (char *));
   if (!names)
     goto cleanup;
 
@@ -2931,7 +2931,7 @@
               if (strncmp (p, "-l", 2) == 0)
                 {
                   size_t name_len = 3 + /* "lib" */ LT_STRLEN (p + 2);
-                  name = LT_EMALLOC (char, 1 + name_len);
+                  name = LT_EGNUNET_malloc (char, 1 + name_len);
                   if (name)
                     sprintf (name, "lib%s", p + 2);
                 }
@@ -2957,7 +2957,7 @@
     {
       int j = 0;
 
-      handle->deplibs = (lt_dlhandle *) LT_EMALLOC (lt_dlhandle *, depcount);
+      handle->deplibs = (lt_dlhandle *) LT_EGNUNET_malloc (lt_dlhandle *, 
depcount);
       if (!handle->deplibs)
         goto cleanup;
 
@@ -2977,11 +2977,11 @@
 cleanup_names:
   for (i = 0; i < depcount; ++i)
     {
-      LT_DLFREE (names[i]);
+      LT_DLGNUNET_free (names[i]);
     }
 
 cleanup:
-  LT_DLFREE (names);
+  LT_DLGNUNET_free (names);
 #endif
 
   return errors;
@@ -3019,11 +3019,11 @@
   size_t len = LT_STRLEN (str);
   char *tmp;
 
-  LT_DLFREE (*dest);
+  LT_DLGNUNET_free (*dest);
 
   if (len > 3 && str[0] == '\'')
     {
-      tmp = LT_EMALLOC (char, end - str);
+      tmp = LT_EGNUNET_malloc (char, end - str);
       if (!tmp)
         return 1;
 
@@ -3046,10 +3046,10 @@
      char *libdir;
      char *deplibs;
 {
-  LT_DLFREE (dlname);
-  LT_DLFREE (oldname);
-  LT_DLFREE (libdir);
-  LT_DLFREE (deplibs);
+  LT_DLGNUNET_free (dlname);
+  LT_DLGNUNET_free (oldname);
+  LT_DLGNUNET_free (libdir);
+  LT_DLGNUNET_free (deplibs);
 
   return 0;
 }
@@ -3076,7 +3076,7 @@
   /* dlopen self? */
   if (!filename)
     {
-      *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1);
+      *phandle = (lt_dlhandle) LT_EGNUNET_malloc (struct lt_dlhandle_struct, 
1);
       if (*phandle == 0)
         return 1;
 
@@ -3088,7 +3088,7 @@
 
       if (tryall_dlopen (&newhandle, 0) != 0)
         {
-          LT_DLFREE (*phandle);
+          LT_DLGNUNET_free (*phandle);
           return 1;
         }
 
@@ -3112,7 +3112,7 @@
     {
       size_t dirlen = (1 + base_name) - canonical;
 
-      dir = LT_EMALLOC (char, 1 + dirlen);
+      dir = LT_EGNUNET_malloc (char, 1 + dirlen);
       if (!dir)
         {
           ++errors;
@@ -3148,7 +3148,7 @@
       int installed = 1;
 
       /* extract the module name from the file name */
-      name = LT_EMALLOC (char, ext - base_name + 1);
+      name = LT_EGNUNET_malloc (char, ext - base_name + 1);
       if (!name)
         {
           ++errors;
@@ -3180,7 +3180,7 @@
         {
           const char *search_path;
 
-          LT_DLMUTEX_LOCK ();
+          LT_DLGNUNET_mutex_lock ();
           search_path = user_search_path;
           if (search_path)
             file = find_file (user_search_path, base_name, &dir);
@@ -3223,7 +3223,7 @@
         }
 
       line_len = LT_FILENAME_MAX;
-      line = LT_EMALLOC (char, line_len);
+      line = LT_EGNUNET_malloc (char, line_len);
       if (!line)
         {
           fclose (file);
@@ -3318,17 +3318,17 @@
         }
 
       fclose (file);
-      LT_DLFREE (line);
+      LT_DLGNUNET_free (line);
 
       /* allocate the handle */
-      *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1);
+      *phandle = (lt_dlhandle) LT_EGNUNET_malloc (struct lt_dlhandle_struct, 
1);
       if (*phandle == 0)
         ++errors;
 
       if (errors)
         {
           free_vars (dlname, old_name, libdir, deplibs);
-          LT_DLFREE (*phandle);
+          LT_DLGNUNET_free (*phandle);
           goto cleanup;
         }
 
@@ -3354,7 +3354,7 @@
       free_vars (dlname, old_name, libdir, deplibs);
       if (errors)
         {
-          LT_DLFREE (*phandle);
+          LT_DLGNUNET_free (*phandle);
           goto cleanup;
         }
 
@@ -3366,7 +3366,7 @@
   else
     {
       /* not a libtool module */
-      *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1);
+      *phandle = (lt_dlhandle) LT_EGNUNET_malloc (struct lt_dlhandle_struct, 
1);
       if (*phandle == 0)
         {
           ++errors;
@@ -3400,7 +3400,7 @@
 
       if (!newhandle)
         {
-          LT_DLFREE (*phandle);
+          LT_DLGNUNET_free (*phandle);
           ++errors;
           goto cleanup;
         }
@@ -3414,7 +3414,7 @@
       (*phandle)->info.ref_count = 1;
       LT_DLMEM_REASSIGN ((*phandle)->info.name, name);
 
-      LT_DLMUTEX_LOCK ();
+      LT_DLGNUNET_mutex_lock ();
       (*phandle)->next = handles;
       handles = *phandle;
       LT_DLMUTEX_UNLOCK ();
@@ -3423,9 +3423,9 @@
   LT_DLMUTEX_SETERROR (saved_error);
 
 cleanup:
-  LT_DLFREE (dir);
-  LT_DLFREE (name);
-  LT_DLFREE (canonical);
+  LT_DLGNUNET_free (dir);
+  LT_DLGNUNET_free (name);
+  LT_DLGNUNET_free (canonical);
 
   return errors;
 }
@@ -3494,7 +3494,7 @@
     }
 
   /* First try appending ARCHIVE_EXT.  */
-  tmp = LT_EMALLOC (char, len + LT_STRLEN (archive_ext) + 1);
+  tmp = LT_EGNUNET_malloc (char, len + LT_STRLEN (archive_ext) + 1);
   if (!tmp)
     return 0;
 
@@ -3509,7 +3509,7 @@
      in the module search path.  */
   if (handle || ((errors > 0) && !file_not_found ()))
     {
-      LT_DLFREE (tmp);
+      LT_DLGNUNET_free (tmp);
       return handle;
     }
 
@@ -3517,8 +3517,8 @@
   /* Try appending SHLIB_EXT.   */
   if (LT_STRLEN (shlib_ext) > LT_STRLEN (archive_ext))
     {
-      LT_DLFREE (tmp);
-      tmp = LT_EMALLOC (char, len + LT_STRLEN (shlib_ext) + 1);
+      LT_DLGNUNET_free (tmp);
+      tmp = LT_EGNUNET_malloc (char, len + LT_STRLEN (shlib_ext) + 1);
       if (!tmp)
         return 0;
 
@@ -3536,7 +3536,7 @@
      with the current error message.  */
   if (handle || ((errors > 0) && !file_not_found ()))
     {
-      LT_DLFREE (tmp);
+      LT_DLGNUNET_free (tmp);
       return handle;
     }
 #endif
@@ -3544,7 +3544,7 @@
   /* Still here?  Then we really did fail to locate any of the file
      names we tried.  */
   LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND));
-  LT_DLFREE (tmp);
+  LT_DLGNUNET_free (tmp);
   return 0;
 }
 
@@ -3647,7 +3647,7 @@
   /* Prepend the directory name.  */
   end_offset = end - dp->d_name;
   buf_len = dir_len + 1 + end_offset;
-  buf = LT_EMALLOC (char, 1 + buf_len);
+  buf = LT_EGNUNET_malloc (char, 1 + buf_len);
   if (!buf)
     return ++errors;
 
@@ -3662,7 +3662,7 @@
   if (lt_argz_insertinorder (pargz, pargz_len, buf) != 0)
     ++errors;
 
-  LT_DLFREE (buf);
+  LT_DLGNUNET_free (buf);
 
   return errors;
 }
@@ -3731,7 +3731,7 @@
   }
 
 cleanup:
-  LT_DLFREE (argz);
+  LT_DLGNUNET_free (argz);
 
   return is_done;
 }
@@ -3795,7 +3795,7 @@
   lt_dlhandle cur, last;
   int errors = 0;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   /* check whether the handle is valid */
   last = cur = handles;
@@ -3835,11 +3835,11 @@
       errors += unload_deplibs (handle);
 
       /* It is up to the callers to free the data itself.  */
-      LT_DLFREE (handle->caller_data);
+      LT_DLGNUNET_free (handle->caller_data);
 
-      LT_DLFREE (handle->info.filename);
-      LT_DLFREE (handle->info.name);
-      LT_DLFREE (handle);
+      LT_DLGNUNET_free (handle->info.filename);
+      LT_DLGNUNET_free (handle->info.name);
+      LT_DLGNUNET_free (handle);
 
       goto done;
     }
@@ -3888,7 +3888,7 @@
     }
   else
     {
-      sym = LT_EMALLOC (char, lensym + LT_SYMBOL_OVERHEAD + 1);
+      sym = LT_EGNUNET_malloc (char, lensym + LT_SYMBOL_OVERHEAD + 1);
       if (!sym)
         {
           LT_DLMUTEX_SETERROR (LT_DLSTRERROR (BUFFER_OVERFLOW));
@@ -3923,7 +3923,7 @@
         {
           if (sym != lsym)
             {
-              LT_DLFREE (sym);
+              LT_DLGNUNET_free (sym);
             }
           return address;
         }
@@ -3944,7 +3944,7 @@
   address = handle->loader->find_sym (data, handle->module, sym);
   if (sym != lsym)
     {
-      LT_DLFREE (sym);
+      LT_DLGNUNET_free (sym);
     }
 
   return address;
@@ -4027,8 +4027,8 @@
   LT_DLMEM_REASSIGN (*ppath, argz);
 
 cleanup:
-  LT_DLFREE (canonical);
-  LT_DLFREE (argz);
+  LT_DLGNUNET_free (canonical);
+  LT_DLGNUNET_free (argz);
 
   return errors;
 }
@@ -4041,7 +4041,7 @@
 
   if (search_dir && *search_dir)
     {
-      LT_DLMUTEX_LOCK ();
+      LT_DLGNUNET_mutex_lock ();
       if (lt_dlpath_insertdir (&user_search_path, 0, search_dir) != 0)
         ++errors;
       LT_DLMUTEX_UNLOCK ();
@@ -4059,7 +4059,7 @@
 
   if (before)
     {
-      LT_DLMUTEX_LOCK ();
+      LT_DLGNUNET_mutex_lock ();
       if ((before < user_search_path)
           || (before >= user_search_path + LT_STRLEN (user_search_path)))
         {
@@ -4072,7 +4072,7 @@
 
   if (search_dir && *search_dir)
     {
-      LT_DLMUTEX_LOCK ();
+      LT_DLGNUNET_mutex_lock ();
       if (lt_dlpath_insertdir (&user_search_path,
                                (char *) before, search_dir) != 0)
         {
@@ -4090,8 +4090,8 @@
 {
   int errors = 0;
 
-  LT_DLMUTEX_LOCK ();
-  LT_DLFREE (user_search_path);
+  LT_DLGNUNET_mutex_lock ();
+  LT_DLGNUNET_free (user_search_path);
   LT_DLMUTEX_UNLOCK ();
 
   if (!search_path || !LT_STRLEN (search_path))
@@ -4099,7 +4099,7 @@
       return errors;
     }
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
   if (canonicalize_path (search_path, &user_search_path) != 0)
     ++errors;
   LT_DLMUTEX_UNLOCK ();
@@ -4112,7 +4112,7 @@
 {
   const char *saved_path;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
   saved_path = user_search_path;
   LT_DLMUTEX_UNLOCK ();
 
@@ -4184,7 +4184,7 @@
   int errors = 0;
   lt_dlhandle cur;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   cur = handles;
   while (cur)
@@ -4210,7 +4210,7 @@
   static lt_dlcaller_id last_caller_id = 0;
   int result;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
   result = ++last_caller_id;
   LT_DLMUTEX_UNLOCK ();
 
@@ -4229,7 +4229,7 @@
 
   /* This needs to be locked so that the caller data can be updated
      simultaneously by different threads.  */
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   if (handle->caller_data)
     while (handle->caller_data[n_elements].key)
@@ -4281,7 +4281,7 @@
 
   /* This needs to be locked so that the caller data isn't updated by
      another thread part way through this function.  */
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   /* Locate the index of the element with a matching KEY.  */
   {
@@ -4324,7 +4324,7 @@
     }
 
   /* Create a new dlloader node with copies of the user callbacks.  */
-  node = LT_EMALLOC (lt_dlloader, 1);
+  node = LT_EGNUNET_malloc (lt_dlloader, 1);
   if (!node)
     return 1;
 
@@ -4337,7 +4337,7 @@
   node->find_sym = dlloader->find_sym;
   node->dlloader_data = dlloader->dlloader_data;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
   if (!loaders)
     {
       /* If there are no loaders, NODE becomes the list! */
@@ -4400,7 +4400,7 @@
       return 1;
     }
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
 
   /* Fail if there are any open modules which use this loader. */
   for (handle = handles; handle; handle = handle->next)
@@ -4439,7 +4439,7 @@
       errors = place->dlloader_exit (place->dlloader_data);
     }
 
-  LT_DLFREE (place);
+  LT_DLGNUNET_free (place);
 
 done:
   LT_DLMUTEX_UNLOCK ();
@@ -4453,7 +4453,7 @@
 {
   lt_dlloader *next;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
   next = place ? place->next : loaders;
   LT_DLMUTEX_UNLOCK ();
 
@@ -4468,7 +4468,7 @@
 
   if (place)
     {
-      LT_DLMUTEX_LOCK ();
+      LT_DLGNUNET_mutex_lock ();
       name = place ? place->loader_name : 0;
       LT_DLMUTEX_UNLOCK ();
     }
@@ -4488,7 +4488,7 @@
 
   if (place)
     {
-      LT_DLMUTEX_LOCK ();
+      LT_DLGNUNET_mutex_lock ();
       data = place ? &(place->dlloader_data) : 0;
       LT_DLMUTEX_UNLOCK ();
     }
@@ -4506,7 +4506,7 @@
 {
   lt_dlloader *place = 0;
 
-  LT_DLMUTEX_LOCK ();
+  LT_DLGNUNET_mutex_lock ();
   for (place = loaders; place; place = place->next)
     {
       if (strcmp (place->loader_name, loader_name) == 0)

Modified: gnunet-gtk/libltdl/ltdl.h
===================================================================
--- gnunet-gtk/libltdl/ltdl.h   2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/libltdl/ltdl.h   2007-11-23 11:57:34 UTC (rev 5743)
@@ -161,7 +161,7 @@
 
 
 
-/* --- MUTEX LOCKING --- */
+/* --- GNUNET_Mutex LOCKING --- */
 
 
 typedef void lt_dlmutex_lock LT_PARAMS ((void));

Modified: gnunet-gtk/po/de.gmo
===================================================================
(Binary files differ)

Modified: gnunet-gtk/po/de.po
===================================================================
--- gnunet-gtk/po/de.po 2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/po/de.po 2007-11-23 11:57:34 UTC (rev 5743)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: GNUnet 0.7.0pre0\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2007-09-29 17:00-0600\n"
+"POT-Creation-Date: 2007-09-30 05:03-0600\n"
 "PO-Revision-Date: 2006-03-17 21:18+0100\n"
 "Last-Translator: Nils Durner <address@hidden>\n"
 "Language-Team: German <address@hidden>\n"
@@ -456,29 +456,29 @@
 msgid "Current (red) and average (green) effectiveness (100% = perfect)"
 msgstr ""
 
-#: src/plugins/peers/peers.c:282
+#: src/plugins/peers/peers.c:284
 msgid "Address"
 msgstr ""
 
-#: src/plugins/peers/peers.c:294
+#: src/plugins/peers/peers.c:296
 msgid "Trust"
 msgstr ""
 
-#: src/plugins/peers/peers.c:306
+#: src/plugins/peers/peers.c:308
 #, fuzzy
 msgid "Bandwidth"
 msgstr "Bandbreitenbeschränkung"
 
-#: src/plugins/peers/peers.c:319
+#: src/plugins/peers/peers.c:321
 msgid "Country"
 msgstr ""
 
-#: src/plugins/peers/peers.c:331
+#: src/plugins/peers/peers.c:333
 #, fuzzy
 msgid "Status"
 msgstr "Stat_us"
 
-#: src/plugins/peers/peers.c:343
+#: src/plugins/peers/peers.c:345
 #, fuzzy
 msgid "Identity"
 msgstr "_Identifizierer:"
@@ -559,7 +559,7 @@
 
 #: gnunet-gtk.glade:90
 #, fuzzy
-msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2a</span>"
+msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2c</span>"
 msgstr "<span size=\"x-large\">Willkommen bei gnunet-gtk 0.7.1b</span>"
 
 #: gnunet-gtk.glade:122

Modified: gnunet-gtk/po/fr.gmo
===================================================================
(Binary files differ)

Modified: gnunet-gtk/po/fr.po
===================================================================
--- gnunet-gtk/po/fr.po 2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/po/fr.po 2007-11-23 11:57:34 UTC (rev 5743)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gnunet-gtk 0.7.0b\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2007-09-29 17:00-0600\n"
+"POT-Creation-Date: 2007-09-30 05:03-0600\n"
 "PO-Revision-Date: 2006-06-24 18:08+0200\n"
 "Last-Translator: Milan <address@hidden>\n"
 "Language-Team: French <address@hidden>\n"
@@ -449,28 +449,28 @@
 msgid "Current (red) and average (green) effectiveness (100% = perfect)"
 msgstr "Efficacité courante (rouge) et moyenne (vert) (100% = parfaite)"
 
-#: src/plugins/peers/peers.c:282
+#: src/plugins/peers/peers.c:284
 msgid "Address"
 msgstr ""
 
-#: src/plugins/peers/peers.c:294
+#: src/plugins/peers/peers.c:296
 msgid "Trust"
 msgstr ""
 
-#: src/plugins/peers/peers.c:306
+#: src/plugins/peers/peers.c:308
 msgid "Bandwidth"
 msgstr ""
 
-#: src/plugins/peers/peers.c:319
+#: src/plugins/peers/peers.c:321
 msgid "Country"
 msgstr ""
 
-#: src/plugins/peers/peers.c:331
+#: src/plugins/peers/peers.c:333
 #, fuzzy
 msgid "Status"
 msgstr "_Activité"
 
-#: src/plugins/peers/peers.c:343
+#: src/plugins/peers/peers.c:345
 #, fuzzy
 msgid "Identity"
 msgstr "Identifiant :"
@@ -556,7 +556,7 @@
 
 #: gnunet-gtk.glade:90
 #, fuzzy
-msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2a</span>"
+msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2c</span>"
 msgstr "<span size=\"x-large\">Bienvenue dans gnunet-gtk 0.7.0e</span>"
 
 #: gnunet-gtk.glade:122

Modified: gnunet-gtk/po/gnunet-gtk.pot
===================================================================
--- gnunet-gtk/po/gnunet-gtk.pot        2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/po/gnunet-gtk.pot        2007-11-23 11:57:34 UTC (rev 5743)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2007-09-29 17:00-0600\n"
+"POT-Creation-Date: 2007-09-30 05:03-0600\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <address@hidden>\n"
 "Language-Team: LANGUAGE <address@hidden>\n"
@@ -431,27 +431,27 @@
 msgid "Current (red) and average (green) effectiveness (100% = perfect)"
 msgstr ""
 
-#: src/plugins/peers/peers.c:282
+#: src/plugins/peers/peers.c:284
 msgid "Address"
 msgstr ""
 
-#: src/plugins/peers/peers.c:294
+#: src/plugins/peers/peers.c:296
 msgid "Trust"
 msgstr ""
 
-#: src/plugins/peers/peers.c:306
+#: src/plugins/peers/peers.c:308
 msgid "Bandwidth"
 msgstr ""
 
-#: src/plugins/peers/peers.c:319
+#: src/plugins/peers/peers.c:321
 msgid "Country"
 msgstr ""
 
-#: src/plugins/peers/peers.c:331
+#: src/plugins/peers/peers.c:333
 msgid "Status"
 msgstr ""
 
-#: src/plugins/peers/peers.c:343
+#: src/plugins/peers/peers.c:345
 msgid "Identity"
 msgstr ""
 
@@ -527,7 +527,7 @@
 msgstr ""
 
 #: gnunet-gtk.glade:90
-msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2a</span>"
+msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2c</span>"
 msgstr ""
 
 #: gnunet-gtk.glade:122

Modified: gnunet-gtk/po/rw.gmo
===================================================================
(Binary files differ)

Modified: gnunet-gtk/po/rw.po
===================================================================
--- gnunet-gtk/po/rw.po 2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/po/rw.po 2007-11-23 11:57:34 UTC (rev 5743)
@@ -16,7 +16,7 @@
 msgstr ""
 "Project-Id-Version: GNUnet 0.7.0pre0\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2007-09-29 17:00-0600\n"
+"POT-Creation-Date: 2007-09-30 05:03-0600\n"
 "PO-Revision-Date: 2005-04-04 10:55-0700\n"
 "Last-Translator: Steven Michael Murphy <address@hidden>\n"
 "Language-Team: Kinyarwanda <address@hidden>\n"
@@ -485,27 +485,27 @@
 msgid "Current (red) and average (green) effectiveness (100% = perfect)"
 msgstr ""
 
-#: src/plugins/peers/peers.c:282
+#: src/plugins/peers/peers.c:284
 msgid "Address"
 msgstr ""
 
-#: src/plugins/peers/peers.c:294
+#: src/plugins/peers/peers.c:296
 msgid "Trust"
 msgstr ""
 
-#: src/plugins/peers/peers.c:306
+#: src/plugins/peers/peers.c:308
 msgid "Bandwidth"
 msgstr ""
 
-#: src/plugins/peers/peers.c:319
+#: src/plugins/peers/peers.c:321
 msgid "Country"
 msgstr ""
 
-#: src/plugins/peers/peers.c:331
+#: src/plugins/peers/peers.c:333
 msgid "Status"
 msgstr ""
 
-#: src/plugins/peers/peers.c:343
+#: src/plugins/peers/peers.c:345
 #, fuzzy
 msgid "Identity"
 msgstr "Urufunguzo Ikiranga"
@@ -586,7 +586,7 @@
 msgstr ""
 
 #: gnunet-gtk.glade:90
-msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2a</span>"
+msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2c</span>"
 msgstr ""
 
 #: gnunet-gtk.glade:122

Modified: gnunet-gtk/po/sv.gmo
===================================================================
(Binary files differ)

Modified: gnunet-gtk/po/sv.po
===================================================================
--- gnunet-gtk/po/sv.po 2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/po/sv.po 2007-11-23 11:57:34 UTC (rev 5743)
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: gnunet-gtk 0.7.2\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2007-09-29 17:00-0600\n"
+"POT-Creation-Date: 2007-09-30 05:03-0600\n"
 "PO-Revision-Date: 2007-06-24 21:24+0200\n"
 "Last-Translator: Daniel Nylander <address@hidden>\n"
 "Language-Team: Swedish <address@hidden>\n"
@@ -441,27 +441,27 @@
 msgid "Current (red) and average (green) effectiveness (100% = perfect)"
 msgstr "Aktuell (röd) och genomsnittlig (grön) effektivitet (100% = perfekt)"
 
-#: src/plugins/peers/peers.c:282
+#: src/plugins/peers/peers.c:284
 msgid "Address"
 msgstr "Adress"
 
-#: src/plugins/peers/peers.c:294
+#: src/plugins/peers/peers.c:296
 msgid "Trust"
 msgstr "Tillit"
 
-#: src/plugins/peers/peers.c:306
+#: src/plugins/peers/peers.c:308
 msgid "Bandwidth"
 msgstr "Bandbredd"
 
-#: src/plugins/peers/peers.c:319
+#: src/plugins/peers/peers.c:321
 msgid "Country"
 msgstr "Land"
 
-#: src/plugins/peers/peers.c:331
+#: src/plugins/peers/peers.c:333
 msgid "Status"
 msgstr "Status"
 
-#: src/plugins/peers/peers.c:343
+#: src/plugins/peers/peers.c:345
 msgid "Identity"
 msgstr "Identitet"
 
@@ -546,7 +546,7 @@
 
 #: gnunet-gtk.glade:90
 #, fuzzy
-msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2a</span>"
+msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2c</span>"
 msgstr "<span size=\"x-large\">Välkommen till gnunet-gtk 0.7.2</span>"
 
 #: gnunet-gtk.glade:122

Modified: gnunet-gtk/po/tr.gmo
===================================================================
(Binary files differ)

Modified: gnunet-gtk/po/tr.po
===================================================================
--- gnunet-gtk/po/tr.po 2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/po/tr.po 2007-11-23 11:57:34 UTC (rev 5743)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gnunet-gtk 0.7.0d.tr\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2007-09-29 17:00-0600\n"
+"POT-Creation-Date: 2007-09-30 05:03-0600\n"
 "PO-Revision-Date: 2006-11-02 21:03+0200\n"
 "Last-Translator: Nilgün Belma Bugüner <address@hidden>\n"
 "Language-Team: Turkish <address@hidden>\n"
@@ -446,28 +446,28 @@
 msgid "Current (red) and average (green) effectiveness (100% = perfect)"
 msgstr ""
 
-#: src/plugins/peers/peers.c:282
+#: src/plugins/peers/peers.c:284
 msgid "Address"
 msgstr ""
 
-#: src/plugins/peers/peers.c:294
+#: src/plugins/peers/peers.c:296
 msgid "Trust"
 msgstr ""
 
-#: src/plugins/peers/peers.c:306
+#: src/plugins/peers/peers.c:308
 msgid "Bandwidth"
 msgstr ""
 
-#: src/plugins/peers/peers.c:319
+#: src/plugins/peers/peers.c:321
 msgid "Country"
 msgstr ""
 
-#: src/plugins/peers/peers.c:331
+#: src/plugins/peers/peers.c:333
 #, fuzzy
 msgid "Status"
 msgstr "D_urum"
 
-#: src/plugins/peers/peers.c:343
+#: src/plugins/peers/peers.c:345
 #, fuzzy
 msgid "Identity"
 msgstr "Betimleyici:"
@@ -547,7 +547,7 @@
 
 #: gnunet-gtk.glade:90
 #, fuzzy
-msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2a</span>"
+msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2c</span>"
 msgstr "<span size=\"x-large\">gnunet-gtk 0.7.0d sürümüne Hoşgeldiniz</span>"
 
 #: gnunet-gtk.glade:122

Modified: gnunet-gtk/po/vi.gmo
===================================================================
(Binary files differ)

Modified: gnunet-gtk/po/vi.po
===================================================================
--- gnunet-gtk/po/vi.po 2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/po/vi.po 2007-11-23 11:57:34 UTC (rev 5743)
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: gnunet-gtk 0.7.2\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2007-09-29 17:00-0600\n"
+"POT-Creation-Date: 2007-09-30 05:03-0600\n"
 "PO-Revision-Date: 2007-07-13 23:29+0930\n"
 "Last-Translator: Clytie Siddall <address@hidden>\n"
 "Language-Team: Vietnamese <address@hidden>\n"
@@ -444,27 +444,27 @@
 msgid "Current (red) and average (green) effectiveness (100% = perfect)"
 msgstr "Độ hữu hiệu hiện thời (đỏ) và trung bình (lục): 100% = hoàn toàn."
 
-#: src/plugins/peers/peers.c:282
+#: src/plugins/peers/peers.c:284
 msgid "Address"
 msgstr "Địa chỉ"
 
-#: src/plugins/peers/peers.c:294
+#: src/plugins/peers/peers.c:296
 msgid "Trust"
 msgstr "Tin cậy"
 
-#: src/plugins/peers/peers.c:306
+#: src/plugins/peers/peers.c:308
 msgid "Bandwidth"
 msgstr "Băng thông"
 
-#: src/plugins/peers/peers.c:319
+#: src/plugins/peers/peers.c:321
 msgid "Country"
 msgstr "Quốc gia"
 
-#: src/plugins/peers/peers.c:331
+#: src/plugins/peers/peers.c:333
 msgid "Status"
 msgstr "Trạng thái"
 
-#: src/plugins/peers/peers.c:343
+#: src/plugins/peers/peers.c:345
 msgid "Identity"
 msgstr "Nhận diện"
 
@@ -546,7 +546,7 @@
 
 #: gnunet-gtk.glade:90
 #, fuzzy
-msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2a</span>"
+msgid "<span size=\"x-large\">Welcome to gnunet-gtk 0.7.2c</span>"
 msgstr "<span size=\"x-large\">Chào mừng tới gnunet-gtk 0.7.2</span>"
 
 #: gnunet-gtk.glade:122

Modified: gnunet-gtk/src/common/Makefile.am
===================================================================
--- gnunet-gtk/src/common/Makefile.am   2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/common/Makefile.am   2007-11-23 11:57:34 UTC (rev 5743)
@@ -22,8 +22,6 @@
   @GNUNETGTK_LIBS@ \
   $(INTLLIBS) \
   -lgnunetutil \
-  -lgnunetutil_crypto \
-  -lgnunetutil_cron \
   -lgthread-2.0 \
   $(LIBNOTIFY_LIBS)
 

Modified: gnunet-gtk/src/common/helper.c
===================================================================
--- gnunet-gtk/src/common/helper.c      2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/common/helper.c      2007-11-23 11:57:34 UTC (rev 5743)
@@ -31,7 +31,7 @@
 #include <glib.h>
 #include <gmodule.h>
 
-#define HELPER_DEBUG NO
+#define HELPER_DEBUG GNUNET_NO
 
 #ifdef WITH_LIBNOTIFY
 #include <libnotify/notify.h>
@@ -45,9 +45,9 @@
 
 typedef struct
 {
-  struct SEMAPHORE *sem;
+  struct GNUNET_Semaphore *sem;
   void *args;
-  PThreadMain func;
+  GNUNET_ThreadMainFunction func;
   int destroyed;
   void *rval;
 } SaveCall;
@@ -68,13 +68,13 @@
 /**
  * the main thread
  */
-static struct PTHREAD *mainThread;
+static struct GNUNET_ThreadHandle *mainThread;
 
 static SaveCall **psc;
 
 static unsigned int pscCount;
 
-static struct MUTEX *sclock;
+static struct GNUNET_Mutex *sclock;
 
 static int saveCallsUp;
 
@@ -86,9 +86,9 @@
 
 static struct GC_Configuration *cfg;
 
-static struct CronManager *cron;
+static struct GNUNET_CronManager *cron;
 
-struct CronManager *
+struct GNUNET_CronManager *
 gnunet_gtk_get_cron ()
 {
   return cron;
@@ -104,7 +104,7 @@
      so remove from psc */
   if (call->sem != NULL)
     {
-      MUTEX_LOCK (sclock);
+      GNUNET_mutex_lock (sclock);
       for (i = 0; i < pscCount; i++)
         {
           if (psc[i] == call)
@@ -114,12 +114,12 @@
             }
         }
       GE_ASSERT (NULL, i != pscCount);
-      GROW (psc, pscCount, pscCount - 1);
-      MUTEX_UNLOCK (sclock);
+      GNUNET_array_grow (psc, pscCount, pscCount - 1);
+      GNUNET_mutex_unlock (sclock);
     }
   call->rval = call->func (call->args);
   if (call->sem != NULL)
-    SEMAPHORE_UP (call->sem);
+    GNUNET_semaphore_up (call->sem);
   return FALSE;
 }
 
@@ -129,30 +129,30 @@
  * all GTK operations have to be done in the main thread
  */
 void *
-gtkSaveCall (PThreadMain func, void *args)
+gtkSaveCall (GNUNET_ThreadMainFunction func, void *args)
 {
   SaveCall call;
 
-  MUTEX_LOCK (sclock);
-  if ((saveCallsUp == NO) || (!PTHREAD_TEST_SELF (mainThread)))
+  GNUNET_mutex_lock (sclock);
+  if ((saveCallsUp == GNUNET_NO) || (!GNUNET_thread_test_self (mainThread)))
     {
       call.args = args;
       call.func = func;
-      call.sem = SEMAPHORE_CREATE (0);
+      call.sem = GNUNET_semaphore_create (0);
       call.destroyed = 0;
       call.rval = NULL;
-      GROW (psc, pscCount, pscCount + 1);
+      GNUNET_array_grow (psc, pscCount, pscCount + 1);
       psc[pscCount - 1] = &call;
       gtk_idle_add (&saveCallWrapper, &call);
-      MUTEX_UNLOCK (sclock);
-      PTHREAD_STOP_SLEEP (mainThread);
-      SEMAPHORE_DOWN (call.sem, YES);
-      SEMAPHORE_DESTROY (call.sem);
+      GNUNET_mutex_unlock (sclock);
+      GNUNET_thread_stop_sleep (mainThread);
+      GNUNET_semaphore_down (call.sem, GNUNET_YES);
+      GNUNET_semaphore_destroy (call.sem);
       return call.rval;
     }
   else
     {
-      MUTEX_UNLOCK (sclock);
+      GNUNET_mutex_unlock (sclock);
       return func (args);
     }
 }
@@ -191,7 +191,7 @@
   method = NULL;
   while (plug != NULL)
     {
-      method = os_plugin_resolve_function (plug->library, handler_name, NO);
+      method = GNUNET_plugin_resolve_function (plug->library, handler_name, 
GNUNET_NO);
       if (method != NULL)
         break;
       plug = plug->next;
@@ -230,18 +230,18 @@
 loadPlugin (const char *name)
 {
   Plugin *p;
-  struct PluginHandle *lib;
+  struct GNUNET_PluginHandle *lib;
   InitCall init;
 
-  lib = os_plugin_load (ectx, "libgnunetgtkmodule_", name);
+  lib = GNUNET_plugin_load (ectx, "libgnunetgtkmodule_", name);
   if (lib == NULL)
     return;
-  p = MALLOC (sizeof (Plugin));
-  p->name = STRDUP (name);
+  p = GNUNET_malloc (sizeof (Plugin));
+  p->name = GNUNET_strdup (name);
   p->next = plugin;
   p->library = lib;
   plugin = p;
-  init = os_plugin_resolve_function (lib, "init_", NO);
+  init = GNUNET_plugin_resolve_function (lib, "init_", GNUNET_NO);
   if (init != NULL)
     init (ectx, cfg);
 }
@@ -256,7 +256,7 @@
   if (names == NULL)
     return;
 
-  dup = STRDUP (names);
+  dup = GNUNET_strdup (names);
   next = dup;
   do
     {
@@ -278,7 +278,7 @@
         loadPlugin (pos);
     }
   while (next != NULL);
-  FREE (dup);
+  GNUNET_free (dup);
 }
 
 static void *
@@ -287,12 +287,12 @@
   PlainCall done;
   Plugin *plug = (Plugin *) p;
 
-  done = os_plugin_resolve_function (plug->library, "done_", NO);
+  done = GNUNET_plugin_resolve_function (plug->library, "done_", GNUNET_NO);
   if (done != NULL)
     done ();
-  os_plugin_unload (plug->library);
-  FREE (plug->name);
-  FREE (plug);
+  GNUNET_plugin_unload (plug->library);
+  GNUNET_free (plug->name);
+  GNUNET_free (plug);
 
   return NULL;
 }
@@ -308,25 +308,25 @@
   ectx = e;
   cfg = c;
   shutdown_function = callback;
-  sclock = MUTEX_CREATE (YES);
-  mainThread = PTHREAD_GET_SELF ();
-  saveCallsUp = YES;
+  sclock = GNUNET_mutex_create (GNUNET_YES);
+  mainThread = GNUNET_thread_get_self ();
+  saveCallsUp = GNUNET_YES;
   cron = cron_create (ectx);
 
   /* load the interface */
-  path = os_get_installation_path (IPK_DATADIR);
+  path = GNUNET_get_installation_path (GNUNET_IPK_DATADIR);
   filename =
-    MALLOC (strlen (path) + strlen ("/../gnunet-gtk/gnunet-gtk.glade") + 2);
+    GNUNET_malloc (strlen (path) + strlen ("/../gnunet-gtk/gnunet-gtk.glade") 
+ 2);
   strcpy (filename, path);
-  FREE (path);
+  GNUNET_free (path);
   strcat (filename, "/../gnunet-gtk/gnunet-gtk.glade");
 #if MINGW
-  gladeFile = MALLOC (_MAX_PATH + 1);
+  gladeFile = GNUNET_malloc (_MAX_PATH + 1);
   plibc_conv_to_win_path (filename, gladeFile);
 #else
-  gladeFile = STRDUP (filename);
+  gladeFile = GNUNET_strdup (filename);
 #endif
-  FREE (filename);
+  GNUNET_free (filename);
 
   mainXML = glade_xml_new (gladeFile, "mainWindow", PACKAGE_NAME);
   if (mainXML == NULL)
@@ -339,9 +339,9 @@
                                      "PLUGINS",
                                      "about daemon fs stats", &load);
   loadPlugins (load);
-  FREE (load);
+  GNUNET_free (load);
   connectGladeWithPlugins (mainXML);
-  cron_start (cron);
+  GNUNET_cron_start (cron);
 }
 
 void
@@ -349,7 +349,7 @@
 {
   int i;
 
-  cron_stop (cron);
+  GNUNET_cron_stop (cron);
   /* unload the plugins */
   while (plugin != NULL)
     {
@@ -361,39 +361,39 @@
     }
   UNREF (mainXML);
   mainXML = NULL;
-  FREE (gladeFile);
+  GNUNET_free (gladeFile);
   gladeFile = NULL;
 
-  saveCallsUp = NO;
-  MUTEX_LOCK (sclock);
+  saveCallsUp = GNUNET_NO;
+  GNUNET_mutex_lock (sclock);
   for (i = 0; i < pscCount; i++)
     psc[i]->func (psc[i]);
   i = pscCount;
-  MUTEX_UNLOCK (sclock);
+  GNUNET_mutex_unlock (sclock);
   /* wait until all PSC-jobs have left
      the gtkSaveCall method before destroying
      the mutex! */
   while (i != 0)
     {
-      PTHREAD_SLEEP (50 * cronMILLIS);
-      MUTEX_LOCK (sclock);
+      GNUNET_thread_sleep (50 * GNUNET_CRON_MILLISECONDS);
+      GNUNET_mutex_lock (sclock);
       i = pscCount;
-      MUTEX_UNLOCK (sclock);
+      GNUNET_mutex_unlock (sclock);
     }
 }
 
 void
 doneGNUnetGTKCommon ()
 {
-  cron_destroy (cron);
-  PTHREAD_REL_SELF (mainThread);
-  MUTEX_DESTROY (sclock);
+  GNUNET_cron_destroy (cron);
+  GNUNET_thread_release_self (mainThread);
+  GNUNET_mutex_destroy (sclock);
 }
 
 struct rwsc_closure
 {
-  struct SEMAPHORE *sig;
-  PThreadMain realMain;
+  struct GNUNET_Semaphore *sig;
+  GNUNET_ThreadMainFunction realMain;
   void *arg;
 };
 
@@ -404,38 +404,38 @@
   void *ret;
 
   ret = cls->realMain (cls->arg);
-  SEMAPHORE_UP (cls->sig);
-  PTHREAD_STOP_SLEEP (mainThread);
+  GNUNET_semaphore_up (cls->sig);
+  GNUNET_thread_stop_sleep (mainThread);
   return ret;
 }
 
 void *
-run_with_save_calls (PThreadMain cb, void *arg)
+run_with_save_calls (GNUNET_ThreadMainFunction cb, void *arg)
 {
-  struct PTHREAD *doneThread;
+  struct GNUNET_ThreadHandle *doneThread;
   void *retval;
   struct rwsc_closure cls;
   int i;
 
-  cls.sig = SEMAPHORE_CREATE (0);
+  cls.sig = GNUNET_semaphore_create (0);
   cls.realMain = cb;
   cls.arg = arg;
-  doneThread = PTHREAD_CREATE (&shutdownCode, &cls, 64 * 1024);
+  doneThread = GNUNET_thread_create (&shutdownCode, &cls, 64 * 1024);
   if (doneThread == NULL)
     GE_DIE_STRERROR (ectx, GE_FATAL | GE_ADMIN | GE_BULK, "pthread_create");
-  if (!PTHREAD_TEST_SELF (mainThread))
+  if (!GNUNET_thread_test_self (mainThread))
     {
       /* another thread will run the save calls */
-      SEMAPHORE_DOWN (cls.sig, YES);
+      GNUNET_semaphore_down (cls.sig, GNUNET_YES);
     }
   else
     {
-      while (SYSERR == SEMAPHORE_DOWN (cls.sig, NO))
+      while (GNUNET_SYSERR == GNUNET_semaphore_down (cls.sig, GNUNET_NO))
         {
-          MUTEX_LOCK (sclock);
+          GNUNET_mutex_lock (sclock);
           if (pscCount > 0)
             {
-              i = weak_randomi (pscCount);
+              i = GNUNET_random_u32(GNUNET_RANDOM_QUALITY_WEAK, pscCount);
               if (TRUE == g_idle_remove_by_data (psc[i]))
                 saveCallWrapper (psc[i]);
             }
@@ -443,15 +443,15 @@
             {
               i = -1;
             }
-          MUTEX_UNLOCK (sclock);
-          if ((i == -1) && (OK != SEMAPHORE_DOWN (cls.sig, NO)))
+          GNUNET_mutex_unlock (sclock);
+          if ((i == -1) && (GNUNET_OK != GNUNET_semaphore_down (cls.sig, 
GNUNET_NO)))
             {
-              PTHREAD_SLEEP (50 * cronMILLIS);
+              GNUNET_thread_sleep (50 * GNUNET_CRON_MILLISECONDS);
             }
         }
     }
-  PTHREAD_JOIN (doneThread, &retval);
-  SEMAPHORE_DESTROY (cls.sig);
+  GNUNET_thread_join (doneThread, &retval);
+  GNUNET_semaphore_destroy (cls.sig);
   return retval;
 }
 
@@ -498,7 +498,7 @@
       va_start (arg, message);
       size = vsnprintf (NULL, 0, message, arg);
       va_end (arg);
-      msg = MALLOC (size + 1);
+      msg = GNUNET_malloc (size + 1);
       va_start (arg, message);
       vsnprintf (msg, size, message, arg);
       va_end (arg);
@@ -507,7 +507,7 @@
                                            PACKAGE_DATA
                                            "/gnunet-gtk/gnunet-gtk-notify.png",
                                            NULL);
-      FREE (msg);
+      GNUNET_free (msg);
       notify_notification_set_timeout (libnotify, libnotify_expire_timeout);
       notify_notification_set_urgency (libnotify, libnotify_urgency);
       if (!notify_notification_show (libnotify, NULL))
@@ -543,8 +543,8 @@
                                  -1,
                                  "UTF-8",
                                  "ISO8859-1", ".", NULL, &send, NULL);
-  FREE (msg);
-  msg = STRDUP (ret);
+  GNUNET_free (msg);
+  msg = GNUNET_strdup (ret);
   g_free (ret);
   GE_BREAK (NULL, TRUE == g_utf8_validate (msg, -1, &end));
   return msg;
@@ -593,7 +593,7 @@
   if (code && !gerror)
     {
       error_message =
-        STRDUP (_
+        GNUNET_strdup (_
                 ("GKSu encountered an unknown error running the configuration 
tool (gnunet-setup)."));
     }
   else if (code && gerror)
@@ -608,11 +608,11 @@
     }
 #elif defined(WINDOWS)
 /* FIXME: run gnunet-setup, assuming we can get the needed rights */
-  error_message = STRDUP (_("Not implemented yet!"));
+  error_message = GNUNET_strdup (_("Not implemented yet!"));
   code = TRUE;
 #else
   error_message =
-    STRDUP (_
+    GNUNET_strdup (_
             ("GKSu support is not enabled, impossible to get the needed 
rights. You should build gnunet-gtk with the --enable-libgksu2 option, or get 
the right binary package. Note you can still start the configuration tool 
(gnunet-setup) manually."));
   code = TRUE;
 #endif
@@ -627,7 +627,7 @@
                                           error_message);
   gtk_dialog_run (GTK_DIALOG (messageDialog));
   gtk_widget_destroy (messageDialog);
-  FREE (error_message);
+  GNUNET_free (error_message);
   return code;
 }
 

Modified: gnunet-gtk/src/common/iterators.c
===================================================================
--- gnunet-gtk/src/common/iterators.c   2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/common/iterators.c   2007-11-23 11:57:34 UTC (rev 5743)
@@ -51,7 +51,7 @@
   i = g_list_length (selected);
   size = 0;
   refs = NULL;
-  GROW (refs, size, i);
+  GNUNET_array_grow (refs, size, i);
   for (i = 0; i < size; i++)
     refs[i] = gtk_tree_row_reference_new (model,
                                           g_list_nth_data (selected, i));
@@ -65,7 +65,7 @@
         func (model, path, &iter, data);
       gtk_tree_path_free (path);
     }
-  GROW (refs, size, 0);
+  GNUNET_array_grow (refs, size, 0);
 }
 
 typedef struct
@@ -82,7 +82,7 @@
   CollectData *cd = cls;
 
   if (cd->size == cd->pos)
-    GROW (cd->refs, cd->size, cd->size * 2 + 4);
+    GNUNET_array_grow (cd->refs, cd->size, cd->size * 2 + 4);
   cd->refs[cd->pos++] = gtk_tree_row_reference_new (model, path);
   return FALSE;
 }
@@ -112,5 +112,5 @@
         func (model, path, &iter, data);
       gtk_tree_path_free (path);
     }
-  GROW (cd.refs, cd.size, 0);
+  GNUNET_array_grow (cd.refs, cd.size, 0);
 }

Modified: gnunet-gtk/src/common/logging.c
===================================================================
--- gnunet-gtk/src/common/logging.c     2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/common/logging.c     2007-11-23 11:57:34 UTC (rev 5743)
@@ -87,7 +87,7 @@
   GtkTextIter end;
 
   init ();
-  if (info->doPopup == YES)
+  if (info->doPopup == GNUNET_YES)
     gtk_widget_show (infoWindow);
   buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (infoWindowTextView));
   gtk_text_buffer_get_iter_at_offset (buffer, &iter, -1);
@@ -104,7 +104,7 @@
 /**
  * Appends a message to the info window
  *
- * @param doPopup do we open the window, YES or NO
+ * @param doPopup do we open the window, GNUNET_YES or GNUNET_NO
  */
 void
 infoMessage (int doPopup, const char *format, ...)
@@ -137,11 +137,11 @@
     }
   else
     gtk_statusbar_pop (GTK_STATUSBAR (s), id);
-  val = STRDUP((const char*) args);
+  val = GNUNET_strdup((const char*) args);
   if (strstr(val, "\n") != NULL)
     strstr(val, "\n")[0] = '\0';
   gtk_statusbar_push (GTK_STATUSBAR (s), id, val);
-  FREE(val);
+  GNUNET_free(val);
   return NULL;
 }
 
@@ -160,7 +160,7 @@
   va_start (args, txt);
   note = g_strdup_vprintf (txt, args);
   va_end (args);
-  infoMessage (NO, note);
+  infoMessage (GNUNET_NO, note);
   gtkSaveCall (&saveAddLogEntry, (void *) note);
   g_free (note);
 }
@@ -171,9 +171,9 @@
 {
   int popUp;
 
-  popUp = NO;
+  popUp = GNUNET_NO;
   if ((kind & (GE_FATAL | GE_ERROR | GE_WARNING)) > 0)
-    popUp = YES;
+    popUp = GNUNET_YES;
   infoMessage (popUp, "%s: %s", date, msg);
 }
 

Modified: gnunet-gtk/src/core/Makefile.am
===================================================================
--- gnunet-gtk/src/core/Makefile.am     2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/core/Makefile.am     2007-11-23 11:57:34 UTC (rev 5743)
@@ -18,7 +18,6 @@
 gnunet_gtk_LDADD = \
   @GTK_LIBS@ \
   -lgnunetutil \
-  -lgnunetutil_boot \
   $(INTLLIBS) \
   -lgthread-2.0 \
   $(top_builddir)/src/common/libgnunetgtk_common.la \

Modified: gnunet-gtk/src/core/eggtrayicon.c
===================================================================
--- gnunet-gtk/src/core/eggtrayicon.c   2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/core/eggtrayicon.c   2007-11-23 11:57:34 UTC (rev 5743)
@@ -651,13 +651,13 @@
   tray_quit = glade_xml_get_widget (trayContextMenuXML, "tray_quit");
 
   tray_icon = egg_tray_icon_new (_("GNU's p2p network"));
-  instDir = os_get_installation_path (IPK_DATADIR);
-  iconPath = MALLOC (strlen (instDir) + 40);
+  instDir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR);
+  iconPath = GNUNET_malloc (strlen (instDir) + 40);
   strcpy (iconPath, instDir);
   strcat (iconPath, "/../gnunet-gtk/gnunet-gtk-tray.png");
-  FREE (instDir);
+  GNUNET_free (instDir);
   pixbuf = gdk_pixbuf_new_from_file (iconPath, NULL);
-  FREE (iconPath);
+  GNUNET_free (iconPath);
   tray_icon_image = gtk_image_new_from_pixbuf (pixbuf);
   eventbox = gtk_event_box_new ();
   gtk_container_add (GTK_CONTAINER (eventbox), tray_icon_image);

Modified: gnunet-gtk/src/core/main.c
===================================================================
--- gnunet-gtk/src/core/main.c  2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/core/main.c  2007-11-23 11:57:34 UTC (rev 5743)
@@ -27,11 +27,11 @@
 #include "platform.h"
 #include "gnunetgtk_common.h"
 #include <GNUnet/gnunet_directories.h>
-#include <GNUnet/gnunet_util_boot.h>
+#include <GNUnet/gnunet_util.h>
 #include "eggtrayicon.h"
 
 #ifdef WINDOWS
-static int debug_mode = NO;
+static int debug_mode = GNUNET_NO;
 #endif
 
 static char *cfgFilename = DEFAULT_CLIENT_CONFIG_FILE;
@@ -39,19 +39,19 @@
 /**
  * All gnunet-gtk command line options
  */
-static struct CommandLineOption gnunetgtkOptions[] = {
-  COMMAND_LINE_OPTION_CFG_FILE (&cfgFilename),  /* -c */
+static struct GNUNET_CommandLineOption gnunetgtkOptions[] = {
+  GNUNET_COMMAND_LINE_OPTION_CFG_FILE (&cfgFilename),  /* -c */
 #ifdef WINDOWS
   {'d', "debug", NULL,
    gettext_noop ("run in debug mode"),
-   0, &gnunet_getopt_configure_set_one, &debug_mode},
+   0, &GNUNET_getopt_configure_set_one, &debug_mode},
 #endif
-  COMMAND_LINE_OPTION_HELP (gettext_noop ("GNUnet GTK user interface.")),      
 /* -h */
-  COMMAND_LINE_OPTION_HOSTNAME, /* -H */
-  COMMAND_LINE_OPTION_LOGGING,  /* -L */
-  COMMAND_LINE_OPTION_VERSION (VERSION),        /* -v */
-  COMMAND_LINE_OPTION_VERBOSE,
-  COMMAND_LINE_OPTION_END,
+  GNUNET_COMMAND_LINE_OPTION_HELP (gettext_noop ("GNUnet GTK user 
interface.")),       /* -h */
+  GNUNET_COMMAND_LINE_OPTION_HOSTNAME, /* -H */
+  GNUNET_COMMAND_LINE_OPTION_LOGGING,  /* -L */
+  GNUNET_COMMAND_LINE_OPTION_VERSION (VERSION),        /* -v */
+  GNUNET_COMMAND_LINE_OPTION_VERBOSE,
+  GNUNET_COMMAND_LINE_OPTION_END,
 };
 
 static void *
@@ -112,9 +112,9 @@
 
 #if ENABLE_NLS
   setlocale (LC_ALL, "");
-  path = os_get_installation_path (IPK_LOCALEDIR);
+  path = GNUNET_get_installation_path (GNUNET_IPK_LOCALEDIR);
   BINDTEXTDOMAIN ("gnunet-gtk", path);
-  FREE (path);
+  GNUNET_free (path);
   textdomain ("gnunet-gtk");
   bind_textdomain_codeset ("GNUnet", "UTF-8");
   bind_textdomain_codeset ("gnunet-gtk", "UTF-8");
@@ -125,11 +125,11 @@
                                      "LOGGING",
                                      "USER-LEVEL", "WARNING", &log);
   mask = GE_getKIND (log);
-  FREE (log);
+  GNUNET_free (log);
   mask |= mask - 1;             /* set all bits... */
   mask |= GE_USER | GE_BULK | GE_IMMEDIATE;
-  if (YES == GC_get_configuration_value_yesno (cfg,
-                                               "LOGGING", "DEVELOPER", NO))
+  if (GNUNET_YES == GC_get_configuration_value_yesno (cfg,
+                                               "LOGGING", "DEVELOPER", 
GNUNET_NO))
     mask |= GE_DEVELOPER | GE_REQUEST;
   my_ctx = createGtkLogger (mask);
   GE_setDefaultContext (my_ctx);

Modified: gnunet-gtk/src/include/gettext.h
===================================================================
--- gnunet-gtk/src/include/gettext.h    2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/include/gettext.h    2007-11-23 11:57:34 UTC (rev 5743)
@@ -32,7 +32,7 @@
    later inclusions of <locale.h> a NOP.  We don't include <libintl.h>
    as well because people using "gettext.h" will not include <libintl.h>,
    and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
-   is OK.  */
+   is GNUNET_OK.  */
 #if defined(__sun)
 # include <locale.h>
 #endif
@@ -51,7 +51,7 @@
     ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
 # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
     ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
-/* slight modification here to avoid warnings: generate NO code,
+/* slight modification here to avoid warnings: generate GNUNET_NO code,
    not even the cast... */
 # define textdomain(Domainname)
 # define bindtextdomain(Domainname, Dirname)

Modified: gnunet-gtk/src/include/gnunetgtk_common.h
===================================================================
--- gnunet-gtk/src/include/gnunetgtk_common.h   2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/include/gnunetgtk_common.h   2007-11-23 11:57:34 UTC (rev 
5743)
@@ -62,7 +62,7 @@
 
 /**
  * Appends a message to the info window
- * @param doPopup if YES, the info window will
+ * @param doPopup if GNUNET_YES, the info window will
  *   be opened
  */
 void infoMessage (int doPopup, const char *format, ...);
@@ -83,7 +83,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 (PThreadMain func, void *arg);
+void *gtkSaveCall (GNUNET_ThreadMainFunction func, void *arg);
 
 /**
  * Run the given "cb" function and save calls
@@ -91,7 +91,7 @@
  * keep save calls going while something else
  * happens).
  */
-void *run_with_save_calls (PThreadMain cb, void *arg);
+void *run_with_save_calls (GNUNET_ThreadMainFunction cb, void *arg);
 
 /**
  * Bind handlers defined by the various
@@ -154,6 +154,6 @@
                              GtkTreeSelectionForeachFunc func, gpointer data);
 
 
-struct CronManager *gnunet_gtk_get_cron (void);
+struct GNUNET_CronManager *gnunet_gtk_get_cron (void);
 
 #endif

Modified: gnunet-gtk/src/include/platform.h
===================================================================
--- gnunet-gtk/src/include/platform.h   2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/include/platform.h   2007-11-23 11:57:34 UTC (rev 5743)
@@ -122,7 +122,7 @@
 #ifdef SOMEBSD
 #include <net/if.h>
 #endif
-#ifdef FREEBSD
+#ifdef GNUNET_freeBSD
 #include <semaphore.h>
 #endif
 #ifdef OSX

Modified: gnunet-gtk/src/plugins/daemon/Makefile.am
===================================================================
--- gnunet-gtk/src/plugins/daemon/Makefile.am   2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/daemon/Makefile.am   2007-11-23 11:57:34 UTC (rev 
5743)
@@ -15,9 +15,6 @@
         @GTK_LIBS@ @GNUNETGTK_LIBS@ \
   $(top_builddir)/src/common/libgnunetgtk_common.la \
   -lgnunetutil \
-  -lgnunetutil_cron \
-  -lgnunetutil_config \
-  -lgnunetgetoption_api \
-  -lgnunetutil_network_client
+  -lgnunetgetoption_api 
 libgnunetgtkmodule_daemon_la_LDFLAGS = \
   -export-dynamic -avoid-version -module

Modified: gnunet-gtk/src/plugins/daemon/daemon.c
===================================================================
--- gnunet-gtk/src/plugins/daemon/daemon.c      2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/daemon/daemon.c      2007-11-23 11:57:34 UTC (rev 
5743)
@@ -28,12 +28,10 @@
 #include "gnunetgtk_common.h"
 #include <GNUnet/gnunet_directories.h>
 #include <GNUnet/gnunet_getoption_lib.h>
-#include <GNUnet/gnunet_util_config_impl.h>
-#include <GNUnet/gnunet_util_cron.h>
-#include <GNUnet/gnunet_util_network_client.h>
+#include <GNUnet/gnunet_util.h>
 #include <gtk/gtk.h>
 
-static struct CronManager *cron;
+static struct GNUNET_CronManager *cron;
 
 static struct GE_Context *ectx;
 
@@ -46,7 +44,7 @@
 static void *
 updateAppModelSafe (void *unused)
 {
-  struct ClientServerConnection *sock;
+  struct GNUNET_ClientServerConnection *sock;
   GtkWidget *w;
   GtkListStore *model;
   GtkTreeIter iter;
@@ -57,9 +55,9 @@
 
   model = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
   apps = NULL;
-  sock = client_connection_create (ectx, cfg);
+  sock = GNUNET_client_connection_create (ectx, cfg);
   if (sock != NULL)
-    apps = getConfigurationOptionValue (sock, "GNUNETD", "APPLICATIONS");
+    apps = GNUNET_get_daemon_configuration_value (sock, "GNUNETD", 
"APPLICATIONS");
   if (apps != NULL)
     {
       next = apps;
@@ -81,24 +79,24 @@
             }
           if (strlen (pos) > 0)
             {
-              desc = getConfigurationOptionValue (sock, "ABOUT", pos);
+              desc = GNUNET_get_daemon_configuration_value (sock, "ABOUT", 
pos);
 
               gtk_list_store_append (model, &iter);
               gtk_list_store_set (model,
                                   &iter,
                                   0, pos, 1, dgettext ("GNUnet", desc), -1);
-              FREENONNULL (desc);
+              GNUNET_free_non_null (desc);
             }
         }
       while (next != NULL);
-      FREE (apps);
+      GNUNET_free (apps);
     }
   w = glade_xml_get_widget (getMainXML (), "applicationList");
   gtk_tree_view_set_model (GTK_TREE_VIEW (w), GTK_TREE_MODEL (model));
   gtk_tree_selection_set_mode (gtk_tree_view_get_selection
                                (GTK_TREE_VIEW (w)), GTK_SELECTION_NONE);
   g_object_unref(model);
-  connection_destroy (sock);
+  GNUNET_client_connection_destroy (sock);
   return NULL;
 }
 
@@ -147,7 +145,7 @@
         isLocal = TRUE;
       else
         isLocal = FALSE;
-      FREE (host);
+      GNUNET_free (host);
     }
   updateAppModelSafe (NULL);
   if (ret == 0)
@@ -157,9 +155,9 @@
           (NULL !=
            (fn = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser)))))
         {
-          if (disk_file_test (ectx, fn) == YES)
+          if (GNUNET_disk_file_test (ectx, fn) == GNUNET_YES)
             {
-              dcfg = GC_create_C_impl ();
+              dcfg = GC_create ();
               canStart = 1;
               if (0 != GC_parse_configuration (dcfg, fn))
                 canStart = 0;
@@ -185,7 +183,7 @@
                   canStart = 1;
 #endif
                 }
-              FREE (user);
+              GNUNET_free (user);
               GC_free (dcfg);
             }
           g_free (fn);
@@ -221,7 +219,7 @@
 {
   int ret;
 
-  if (OK == connection_test_running (ectx, cfg))
+  if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg))
     ret = 1;
   else
     ret = 0;
@@ -241,7 +239,7 @@
 
   launchEntry = glade_xml_get_widget (getMainXML (), "startDaemon");
   gtk_widget_set_sensitive (launchEntry, FALSE);
-  if (OK == connection_test_running (ectx, cfg))
+  if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg))
     {
       cronCheckDaemon (NULL);
       return;
@@ -254,7 +252,7 @@
                                 "gnunetdconfigFileChooserButton");
       fn = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
       GE_BREAK (ectx, fn != NULL);
-      if (SYSERR != os_daemon_start (ectx, cfg, fn, YES))
+      if (GNUNET_SYSERR != GNUNET_daemon_start (ectx, cfg, fn, GNUNET_YES))
         {
           addLogEntry (_("Launched gnunetd"));
         }
@@ -274,15 +272,15 @@
 on_stopDaemon_clicked_daemon (GtkWidget * widget, gpointer data)
 {
   GtkWidget *killEntry = NULL;
-  struct ClientServerConnection *sock;
+  struct GNUNET_ClientServerConnection *sock;
 
   killEntry = glade_xml_get_widget (getMainXML (), "stopDaemon");
   gtk_widget_set_sensitive (killEntry, FALSE);
 
-  if (OK == connection_test_running (ectx, cfg))
+  if (GNUNET_OK == GNUNET_test_daemon_running (ectx, cfg))
     {
-      sock = client_connection_create (ectx, cfg);
-      if (OK != connection_request_shutdown (sock))
+      sock = GNUNET_client_connection_create (ectx, cfg);
+      if (GNUNET_OK != GNUNET_client_connection_request_daemon_shutdown (sock))
         {
           GtkWidget *dialog;
 
@@ -298,7 +296,7 @@
         {
           addLogEntry (_("Terminating gnunetd..."));
         }
-      connection_destroy (sock);
+      GNUNET_client_connection_destroy (sock);
     }
   cronCheckDaemon (NULL);
 }
@@ -343,7 +341,7 @@
                                        "CONFIGFILE",
                                        DEFAULT_DAEMON_CONFIG_FILE,
                                        &daemon_config);
-  if (YES == disk_file_test (NULL, daemon_config))
+  if (GNUNET_YES == GNUNET_disk_file_test (NULL, daemon_config))
     {
       gtk_file_chooser_set_filename (GTK_FILE_CHOOSER
                                      (glade_xml_get_widget
@@ -357,12 +355,12 @@
                    ("Configuration file for GNUnet daemon `%s' does not exist! 
Run `gnunet-setup -d'."),
                    daemon_config);
     }
-  FREE (daemon_config);
+  GNUNET_free (daemon_config);
 
   cron = gnunet_gtk_get_cron ();
-  cron_add_job (cron, &cronCheckDaemon, 0, 15 * cronSECONDS, NULL);
-  cron_add_job (cron,
-                &updateAppModel, 5 * cronMINUTES, 5 * cronMINUTES, NULL);
+  GNUNET_cron_add_job (cron, &cronCheckDaemon, 0, 15 * GNUNET_CRON_SECONDS, 
NULL);
+  GNUNET_cron_add_job (cron,
+                &updateAppModel, 5 * GNUNET_CRON_MINUTES, 5 * 
GNUNET_CRON_MINUTES, NULL);
 }
 
 void
@@ -370,8 +368,8 @@
 {
   GtkWidget *w;
 
-  cron_del_job (cron, &cronCheckDaemon, 15 * cronSECONDS, NULL);
-  cron_del_job (cron, &updateAppModel, 5 * cronMINUTES, NULL);
+  GNUNET_cron_del_job (cron, &cronCheckDaemon, 15 * GNUNET_CRON_SECONDS, NULL);
+  GNUNET_cron_del_job (cron, &updateAppModel, 5 * GNUNET_CRON_MINUTES, NULL);
   w = glade_xml_get_widget (getMainXML (), "applicationList");
   gtk_tree_view_set_model (GTK_TREE_VIEW (w), NULL);
 

Modified: gnunet-gtk/src/plugins/fs/Makefile.am
===================================================================
--- gnunet-gtk/src/plugins/fs/Makefile.am       2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/fs/Makefile.am       2007-11-23 11:57:34 UTC (rev 
5743)
@@ -34,8 +34,7 @@
   -lgnunetfsui \
   -lgnunetnamespace \
   -lgnuneturitrack \
-  -lgnunetecrs \
-  -lgnunetutil_crypto
+  -lgnunetecrs 
 libgnunetgtkmodule_fs_la_LDFLAGS = \
   -export-dynamic -avoid-version -module
 

Modified: gnunet-gtk/src/plugins/fs/collection.c
===================================================================
--- gnunet-gtk/src/plugins/fs/collection.c      2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/fs/collection.c      2007-11-23 11:57:34 UTC (rev 
5743)
@@ -57,7 +57,7 @@
   GtkWidget *spin;
   struct ECRS_MetaData *meta;
   struct ECRS_URI *root;
-  TIME_T updateInterval;
+  GNUNET_Int32Time updateInterval;
 
   metaXML
     = glade_xml_new (getGladeFileName (),
@@ -77,7 +77,7 @@
         updateInterval = ECRS_SBLOCK_UPDATE_SPORADIC;
       else if (0 == strcmp (_("--no update--"), updateIntervalString))
         updateInterval = ECRS_SBLOCK_UPDATE_NONE;
-      else if (OK != parseTime (updateIntervalString, &updateInterval))
+      else if (GNUNET_OK != parseTime (updateIntervalString, &updateInterval))
         {
           gtk_widget_destroy (dialog);
           UNREF (metaXML);
@@ -97,7 +97,7 @@
       nameLine = glade_xml_get_widget (metaXML, "collectionIdentifierEntry");
       collectionName = gtk_entry_get_text (GTK_ENTRY (nameLine));
       root = NULL;
-      if (OK == CO_startCollection (gtk_spin_button_get_value_as_int 
(GTK_SPIN_BUTTON (spin)), 1000,    /* priority */
+      if (GNUNET_OK == CO_startCollection (gtk_spin_button_get_value_as_int 
(GTK_SPIN_BUTTON (spin)), 1000,    /* priority */
                                     updateInterval, collectionName, meta))
         {
           w = glade_xml_get_widget (getMainXML (), "createCollection");
@@ -131,17 +131,17 @@
 {
   GtkWidget *w;
 
-  if (OK == CO_stopCollection ())
+  if (GNUNET_OK == CO_stopCollection ())
     {
       w = glade_xml_get_widget (getMainXML (), "createCollection");
       gtk_widget_set_sensitive (w, TRUE);
       w = glade_xml_get_widget (getMainXML (), "deleteCollection");
       gtk_widget_set_sensitive (w, FALSE);
-      infoMessage (NO, _("Collection stopped.\n"));
+      infoMessage (GNUNET_NO, _("Collection stopped.\n"));
     }
   else
     {
-      infoMessage (YES, _("Failed to stop collection (consult logs).\n"));
+      infoMessage (GNUNET_YES, _("Failed to stop collection (consult 
logs).\n"));
     }
 }
 
@@ -155,7 +155,7 @@
   if (NULL != h)
     {
       w = glade_xml_get_widget (getMainXML (), "createCollection");
-      FREE (h);
+      GNUNET_free (h);
     }
   else
     w = glade_xml_get_widget (getMainXML (), "deleteCollection");

Modified: gnunet-gtk/src/plugins/fs/content_tracking.c
===================================================================
--- gnunet-gtk/src/plugins/fs/content_tracking.c        2007-11-23 11:51:54 UTC 
(rev 5742)
+++ gnunet-gtk/src/plugins/fs/content_tracking.c        2007-11-23 11:57:34 UTC 
(rev 5743)
@@ -92,7 +92,7 @@
                       cfg,
                       gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
                                                     (trackCheckButton)) ==
-                      TRUE ? YES : NO);
+                      TRUE ? GNUNET_YES : GNUNET_NO);
 }
 
 
@@ -129,7 +129,7 @@
                                         EXTRACTOR_UNKNOWN, -1);
   if (filename == NULL)
     {
-      filename = STRDUP (_("no name given"));
+      filename = GNUNET_strdup (_("no name given"));
     }
   else
     {
@@ -146,7 +146,7 @@
     size = 0;
   uriString = ECRS_uriToString (fi->uri);
   gtk_list_store_append (GTK_LIST_STORE (model), &iter);
-  size_h = string_get_fancy_byte_size (size);
+  size_h = GNUNET_get_byte_size_as_fancy_string (size);
   gtk_list_store_set (GTK_LIST_STORE (model),
                       &iter,
                       NAMESPACE_FILENAME, filename,
@@ -155,9 +155,9 @@
                       NAMESPACE_URISTRING, uriString,
                       NAMESPACE_URI, ECRS_dupUri (fi->uri),
                       NAMESPACE_META, ECRS_dupMetaData (fi->meta), -1);
-  FREE (size_h);
-  FREE (filename);
-  FREE (uriString);
+  GNUNET_free (size_h);
+  GNUNET_free (filename);
+  GNUNET_free (uriString);
   return NULL;
 }
 
@@ -168,8 +168,8 @@
  */
 int
 updateViewSave (const ECRS_FileInfo * fi,
-                const HashCode512 * key, int isRoot, void *closure)
+                const GNUNET_HashCode * key, int isRoot, void *closure)
 {
   gtkSaveCall (&updateView, (void *) fi);
-  return OK;
+  return GNUNET_OK;
 }

Modified: gnunet-gtk/src/plugins/fs/content_tracking.h
===================================================================
--- gnunet-gtk/src/plugins/fs/content_tracking.h        2007-11-23 11:51:54 UTC 
(rev 5742)
+++ gnunet-gtk/src/plugins/fs/content_tracking.h        2007-11-23 11:57:34 UTC 
(rev 5743)
@@ -35,6 +35,6 @@
  * present!
  */
 int updateViewSave (const ECRS_FileInfo * fi,
-                    const HashCode512 * key, int isRoot, void *closure);
+                    const GNUNET_HashCode * key, int isRoot, void *closure);
 
 #endif

Modified: gnunet-gtk/src/plugins/fs/directory.c
===================================================================
--- gnunet-gtk/src/plugins/fs/directory.c       2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/fs/directory.c       2007-11-23 11:57:34 UTC (rev 
5743)
@@ -68,11 +68,11 @@
 
 static int
 spcb (const ECRS_FileInfo * fi,
-      const HashCode512 * key, int isRoot, void *closure)
+      const GNUNET_HashCode * key, int isRoot, void *closure)
 {
   SearchList *list = closure;
   fs_search_result_received (list, fi, list->uri);
-  return OK;
+  return GNUNET_OK;
 }
 
 
@@ -93,19 +93,19 @@
   dn = selectFile ();
   if (dn == NULL)
     return;
-  if ((YES != disk_file_test (NULL,
+  if ((GNUNET_YES != GNUNET_disk_file_test (NULL,
                               dn)) ||
-      (OK != disk_file_size (NULL, dn, &directory_data_len, YES)))
+      (GNUNET_OK != GNUNET_disk_file_size (NULL, dn, &directory_data_len, 
GNUNET_YES)))
     {
       addLogEntry (_("Error accessing file `%s'."), dn);
-      FREE (dn);
+      GNUNET_free (dn);
       return;
     }
-  fd = disk_file_open (NULL, dn, O_LARGEFILE | O_RDONLY);
+  fd = GNUNET_disk_file_open (NULL, dn, O_LARGEFILE | O_RDONLY);
   if (fd == -1)
     {
       addLogEntry (_("Error opening file `%s'."), dn);
-      FREE (dn);
+      GNUNET_free (dn);
       return;
     }
   dlen = (size_t) directory_data_len;
@@ -114,7 +114,7 @@
     {
       addLogEntry (_("Error mapping file `%s' into memory."), dn);
       CLOSE (fd);
-      FREE (dn);
+      GNUNET_free (dn);
       return;
     }
   kws[0] = dn;
@@ -129,7 +129,7 @@
     ECRS_freeMetaData (md);
   MUNMAP (directory_data, dlen);
   CLOSE (fd);
-  FREE (dn);
+  GNUNET_free (dn);
 
   /* switch view -- select directory */
   notebook

Modified: gnunet-gtk/src/plugins/fs/download.c
===================================================================
--- gnunet-gtk/src/plugins/fs/download.c        2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/fs/download.c        2007-11-23 11:57:34 UTC (rev 
5743)
@@ -40,7 +40,7 @@
  */
 static int
 addFilesToDirectory (const ECRS_FileInfo * fi,
-                     const HashCode512 * key, int isRoot, void *closure)
+                     const GNUNET_HashCode * key, int isRoot, void *closure)
 {
   DownloadList *list = closure;
   GtkTreeIter iter;
@@ -49,16 +49,16 @@
   GtkTreePath *path;
   GtkTreeModel *model;
 
-  if (isRoot == YES)
-    return OK;
+  if (isRoot == GNUNET_YES)
+    return GNUNET_OK;
   if (!gtk_tree_row_reference_valid (list->searchViewRowReference))
-    return SYSERR;
+    return GNUNET_SYSERR;
   model = GTK_TREE_MODEL (list->searchList->tree);
   path = gtk_tree_row_reference_get_path (list->searchViewRowReference);
   if (path == NULL)
     {
       GE_BREAK (ectx, 0);
-      return SYSERR;
+      return GNUNET_SYSERR;
     }
   gtk_tree_model_get_iter (model, &iter, path);
   gtk_tree_path_free (path);
@@ -72,12 +72,12 @@
           uri = NULL;
           gtk_tree_model_get (model, &child, SEARCH_URI, &uri, -1);
           if ((uri != NULL) && (ECRS_equalsUri (uri, fi->uri)))
-            return OK;
+            return GNUNET_OK;
         }
     }
   gtk_tree_store_append (GTK_TREE_STORE (model), &child, &iter);
   addEntryToSearchTree (list->searchList, list, fi, &child);
-  return OK;
+  return GNUNET_OK;
 }
 
 static void
@@ -91,7 +91,7 @@
   struct stat buf;
   const char *f;
 
-  if ((list->is_directory != YES) ||
+  if ((list->is_directory != GNUNET_YES) ||
       (list->searchList == NULL) ||
       (list->searchViewRowReference == NULL) ||
       (!gtk_tree_row_reference_valid (list->searchViewRowReference)))
@@ -102,14 +102,14 @@
   if (S_ISDIR (buf.st_mode))
     {
       fn =
-        MALLOC (strlen (list->filename) + strlen (GNUNET_DIRECTORY_EXT) + 1);
+        GNUNET_malloc (strlen (list->filename) + strlen (GNUNET_DIRECTORY_EXT) 
+ 1);
       strcpy (fn, list->filename);
       if (fn[strlen (fn) - 1] == '/')
         fn[strlen (fn) - 1] = '\0';
       strcat (fn, GNUNET_DIRECTORY_EXT);
       if (0 != stat (list->filename, &buf))
         {
-          FREE (fn);
+          GNUNET_free (fn);
           return;
         }
       f = fn;
@@ -122,13 +122,13 @@
   size = buf.st_size;
   if (size == 0)
     {
-      FREENONNULL (fn);
+      GNUNET_free_non_null (fn);
       return;
     }
-  fd = disk_file_open (ectx, list->filename, O_RDONLY);
+  fd = GNUNET_disk_file_open (ectx, list->filename, O_RDONLY);
   if (fd == -1)
     {
-      FREENONNULL (fn);
+      GNUNET_free_non_null (fn);
       return;
     }
   data = MMAP (NULL, size, PROT_READ, MAP_SHARED, fd, 0);
@@ -136,10 +136,10 @@
     {
       GE_LOG_STRERROR_FILE (ectx, GE_ERROR | GE_ADMIN | GE_BULK, "mmap", f);
       CLOSE (fd);
-      FREENONNULL (fn);
+      GNUNET_free_non_null (fn);
       return;
     }
-  FREENONNULL (fn);
+  GNUNET_free_non_null (fn);
   meta = NULL;
   ECRS_listDirectory (ectx, data, size, &meta, &addFilesToDirectory, list);
   MUNMAP (data, size);
@@ -162,7 +162,7 @@
                      const ECRS_FileInfo * fi,
                      const char *filename,
                      unsigned long long completed,
-                     cron_t eta, FSUI_State state)
+                     GNUNET_CronTime eta, FSUI_State state)
 {
   DownloadList *list;
   GtkTreeIter iter;
@@ -178,10 +178,10 @@
   GtkTreeModel *model;
 
   /* setup visualization */
-  list = MALLOC (sizeof (DownloadList));
+  list = GNUNET_malloc (sizeof (DownloadList));
   memset (list, 0, sizeof (DownloadList));
   list->uri = ECRS_dupUri (fi->uri);
-  list->filename = STRDUP (filename);
+  list->filename = GNUNET_strdup (filename);
   if ((dl_parent != NULL) &&
       (NULL !=
        (path =
@@ -205,7 +205,7 @@
       gtk_tree_store_append (download_summary, &iter, NULL);
     }
   size = ECRS_fileSize (fi->uri);
-  size_h = string_get_fancy_byte_size (size);
+  size_h = GNUNET_get_byte_size_as_fancy_string (size);
   sname = &filename[strlen (filename) - 1];
   while ((sname > filename) && (sname[-1] != '/') && (sname[-1] != '\\'))
     sname--;
@@ -223,8 +223,8 @@
                       DOWNLOAD_PROGRESS, progress,
                       DOWNLOAD_URISTRING, uri_name,
                       DOWNLOAD_INTERNAL, list, -1);
-  FREE (uri_name);
-  FREE (size_h);
+  GNUNET_free (uri_name);
+  GNUNET_free (size_h);
   path = gtk_tree_model_get_path (GTK_TREE_MODEL (download_summary), &iter);
   list->summaryViewRowReference
     = gtk_tree_row_reference_new (GTK_TREE_MODEL (download_summary), path);
@@ -304,7 +304,7 @@
   list->has_terminated = ((state != FSUI_ACTIVE) && (state != FSUI_PENDING));
   list->next = download_head;
   download_head = list;
-  if ((list->is_directory == YES) && (completed != 0))
+  if ((list->is_directory == GNUNET_YES) && (completed != 0))
     refreshDirectoryViewFromDisk (list);
   return list;
 }
@@ -337,7 +337,7 @@
   else
     val = 100;
   gtk_tree_store_set (download_summary, &iter, DOWNLOAD_PROGRESS, val, -1);
-  if ((list->is_directory == YES) &&
+  if ((list->is_directory == GNUNET_YES) &&
       (list->searchList != NULL) && (list->searchViewRowReference != NULL))
     {
       meta = NULL;
@@ -372,7 +372,7 @@
                           SEARCH_CELL_BG_COLOR,
                           getColorCode (URITRACK_DOWNLOAD_COMPLETED), -1);
     }
-  downloadContext->has_terminated = YES;
+  downloadContext->has_terminated = GNUNET_YES;
   refreshDirectoryViewFromDisk (downloadContext);
 }
 
@@ -400,7 +400,7 @@
                           SEARCH_CELL_BG_COLOR,
                           getColorCode (URITRACK_DOWNLOAD_ABORTED), -1);
     }
-  downloadContext->has_terminated = YES;
+  downloadContext->has_terminated = GNUNET_YES;
   refreshDirectoryViewFromDisk (downloadContext);
 }
 
@@ -432,7 +432,7 @@
       list->summaryViewRowReference = NULL;
       gtk_tree_store_remove (download_summary, &iter);
     }
-  FREE (list->filename);
+  GNUNET_free (list->filename);
   ECRS_freeUri (list->uri);
 
   /* if we have child-results in view, remove them! */
@@ -473,7 +473,7 @@
       else
         GE_BREAK (ectx, 0);
     }
-  FREE (list);
+  GNUNET_free (list);
 }
 
 
@@ -483,7 +483,7 @@
  * Check if a download for the given filename is
  * already running.
  *
- * @return OK if no download is pending, SYSERR if
+ * @return GNUNET_OK if no download is pending, GNUNET_SYSERR if
  *  such a download is already active.
  */
 static int
@@ -502,16 +502,16 @@
           if ((name != NULL) && (0 == strcmp (name, filename)))
             {
               free (name);
-              return SYSERR;
+              return GNUNET_SYSERR;
             }
           if (name != NULL)
             free (name);
-          if (SYSERR == check_pending (filename, &iter))
-            return SYSERR;
+          if (GNUNET_SYSERR == check_pending (filename, &iter))
+            return GNUNET_SYSERR;
         }
       while (gtk_tree_model_iter_next (model, &iter));
     }
-  return OK;
+  return GNUNET_OK;
 }
 
 typedef struct
@@ -582,8 +582,8 @@
       (!(ECRS_isFileUri (sdc.idc_uri) || ECRS_isLocationUri (sdc.idc_uri))))
     {
       GE_BREAK (ectx, 0);
-      FREENONNULL (idc_name);
-      FREENONNULL (idc_mime);
+      GNUNET_free_non_null (idc_name);
+      GNUNET_free_non_null (idc_mime);
       return;
     }
   sdc.uri_name = ECRS_uriToString (sdc.idc_uri);
@@ -592,9 +592,9 @@
        strlen (ECRS_URI_PREFIX) + strlen (ECRS_FILE_INFIX)))
     {
       GE_BREAK (ectx, 0);
-      FREENONNULL (sdc.uri_name);
-      FREENONNULL (idc_name);
-      FREENONNULL (idc_mime);
+      GNUNET_free_non_null (sdc.uri_name);
+      GNUNET_free_non_null (idc_name);
+      GNUNET_free_non_null (idc_mime);
       return;
     }
   /* reduce "//" to "/" */
@@ -614,21 +614,21 @@
       GE_ASSERT (NULL,
                  strlen (sdc.uri_name) >
                  strlen (ECRS_URI_PREFIX) + strlen (ECRS_FILE_INFIX));
-      FREENONNULL (idc_name);
+      GNUNET_free_non_null (idc_name);
       filehash =
-        STRDUP (&sdc.
+        GNUNET_strdup (&sdc.
                 uri_name[strlen (ECRS_URI_PREFIX) +
                          strlen (ECRS_FILE_INFIX)]);
       filehash[16] = 0;
-      idc_name = STRDUP (filehash);
-      FREENONNULL (filehash);
+      idc_name = GNUNET_strdup (filehash);
+      GNUNET_free_non_null (filehash);
 #else
       GE_ASSERT (NULL,
                  strlen (sdc.uri_name) >
                  strlen (ECRS_URI_PREFIX) + strlen (ECRS_FILE_INFIX));
-      FREENONNULL (idc_name);
+      GNUNET_free_non_null (idc_name);
       idc_name =
-        STRDUP (&sdc.
+        GNUNET_strdup (&sdc.
                 uri_name[strlen (ECRS_URI_PREFIX) +
                          strlen (ECRS_FILE_INFIX)]);
 #endif
@@ -636,7 +636,7 @@
 
   /* dname = directory portion of idc_name */
   cname = idc_name;
-  dname = STRDUP (idc_name);
+  dname = GNUNET_strdup (idc_name);
   cname = &dname[strlen (dname) - 1];
   if (cname != dname)
     cname--;                    /* ignore tailing '/' */
@@ -645,8 +645,8 @@
   if (*cname == DIR_SEPARATOR)
     {
       *cname = '\0';
-      FREE (idc_name);
-      idc_name = STRDUP (cname + 1);
+      GNUNET_free (idc_name);
+      idc_name = GNUNET_strdup (cname + 1);
     }
   else
     {
@@ -661,7 +661,7 @@
                                        &final_download_dir);
   if (strlen (dname) > 0)
     {
-      tmp = MALLOC (strlen (final_download_dir) + strlen (dname) + 2);
+      tmp = GNUNET_malloc (strlen (final_download_dir) + strlen (dname) + 2);
       strcpy (tmp, final_download_dir);
       if (tmp[strlen (tmp)] != DIR_SEPARATOR)
         strcat (tmp, DIR_SEPARATOR_STR);
@@ -669,14 +669,14 @@
         strcat (tmp, &dname[1]);
       else
         strcat (tmp, dname);
-      FREE (final_download_dir);
+      GNUNET_free (final_download_dir);
       final_download_dir = tmp;
     }
-  FREE (dname);
+  GNUNET_free (dname);
   dname = NULL;
   /* If file is inside a directory, get the full path */
   dirTreePath = gtk_tree_path_copy (path);
-  dirPath = MALLOC (1);
+  dirPath = GNUNET_malloc (1);
   dirPath[0] = '\0';
   dirPathLen = 0;
   while (gtk_tree_path_get_depth (dirTreePath) > 1)
@@ -691,12 +691,12 @@
       gtk_tree_model_get (model, &iiter, SEARCH_NAME, &dirname, -1);
       dirPathLen =
         strlen (dirPath) + strlen (dirname) + strlen (DIR_SEPARATOR_STR) + 1;
-      newPath = MALLOC (dirPathLen + 1);
+      newPath = GNUNET_malloc (dirPathLen + 1);
       strcpy (newPath, dirname);
       if (newPath[strlen (newPath) - 1] != DIR_SEPARATOR)
         strcat (newPath, DIR_SEPARATOR_STR);
       strcat (newPath, dirPath);
-      FREE (dirPath);
+      GNUNET_free (dirPath);
       dirPath = newPath;
       free (dirname);
     }
@@ -704,7 +704,7 @@
 
   /* construct completed/directory/real-filename */
   sdc.idc_final_download_destination =
-    MALLOC (strlen (final_download_dir) + 2 + strlen (idc_name) +
+    GNUNET_malloc (strlen (final_download_dir) + 2 + strlen (idc_name) +
             strlen (GNUNET_DIRECTORY_EXT) + strlen (dirPath));
   strcpy (sdc.idc_final_download_destination, final_download_dir);
   if (sdc.
@@ -718,7 +718,7 @@
                                       "downloadAnonymitySpinButton");
   sdc.recursive = getToggleButtonValue (sdc.searchContext->searchXML,
                                         "downloadRecursiveCheckButton");
-  if (OK == check_pending (idc_name, NULL))
+  if (GNUNET_OK == check_pending (idc_name, NULL))
     {
       addLogEntry (_("Downloading `%s'\n"), idc_name);
       run_with_save_calls (&init_download_helper, &sdc);
@@ -727,17 +727,17 @@
     {
       addLogEntry (_("ERROR: already downloading `%s'"), idc_name);
     }
-  FREE (sdc.uri_name);
-  FREE (dirPath);
-  FREE (sdc.idc_final_download_destination);
-  FREENONNULL (final_download_dir);
-  FREENONNULL (idc_name);
-  FREENONNULL (idc_mime);
+  GNUNET_free (sdc.uri_name);
+  GNUNET_free (dirPath);
+  GNUNET_free (sdc.idc_final_download_destination);
+  GNUNET_free_non_null (final_download_dir);
+  GNUNET_free_non_null (idc_name);
+  GNUNET_free_non_null (idc_mime);
 }
 
 /**
  * The download button in the search dialog was
- * clicked.  Download all selected entries.
+ * clicked.  GNUNET_ND_DOWNLOAD all selected entries.
  */
 void
 on_downloadButton_clicked_fs (GtkWidget * treeview,
@@ -770,27 +770,27 @@
   SDC sdc;
 
   uris = gtk_entry_get_text (GTK_ENTRY (entry));
-  urid = STRDUP (uris);
+  urid = GNUNET_strdup (uris);
   gtk_entry_set_text (GTK_ENTRY (entry), ECRS_URI_PREFIX);
   sdc.idc_uri = ECRS_stringToUri (ectx, urid);
   if (sdc.idc_uri == NULL)
     {
       addLogEntry (_("Invalid URI `%s'"), urid);
-      FREE (urid);
+      GNUNET_free (urid);
       return;
     }
   if (ECRS_isKeywordUri (sdc.idc_uri))
     {
       addLogEntry (_
                    ("Please use the search function for keyword (KSK) URIs!"));
-      FREE (urid);
+      GNUNET_free (urid);
       ECRS_freeUri (sdc.idc_uri);
       return;
     }
   else if (ECRS_isLocationUri (sdc.idc_uri))
     {
       addLogEntry (_("Location URIs are not yet supported"));
-      FREE (urid);
+      GNUNET_free (urid);
       ECRS_freeUri (sdc.idc_uri);
       return;
     }
@@ -799,12 +799,12 @@
                                        "INCOMINGDIR",
                                        "$HOME/gnunet-downloads/",
                                        &final_download_dir);
-  disk_directory_create (ectx, final_download_dir);
+  GNUNET_disk_directory_create (ectx, final_download_dir);
   dname = &uris[strlen (ECRS_URI_PREFIX) + strlen (ECRS_FILE_INFIX)];
   sdc.idc_final_download_destination =
-    MALLOC (strlen (final_download_dir) + strlen (dname) + 2);
+    GNUNET_malloc (strlen (final_download_dir) + strlen (dname) + 2);
   strcpy (sdc.idc_final_download_destination, final_download_dir);
-  FREE (final_download_dir);
+  GNUNET_free (final_download_dir);
   if (sdc.
       idc_final_download_destination[strlen
                                      (sdc.idc_final_download_destination)] !=
@@ -815,13 +815,13 @@
   addLogEntry (_("Downloading `%s'\n"), uris);
   sdc.idc_meta = ECRS_createMetaData ();
   sdc.anonymity = getSpinButtonValue (getMainXML (), "fsstatusAnonymitySpin");
-  sdc.recursive = NO;
+  sdc.recursive = GNUNET_NO;
   sdc.searchContext = NULL;
   sdc.parentContext = NULL;
   run_with_save_calls (&init_download_helper, &sdc);
   ECRS_freeMetaData (sdc.idc_meta);
-  FREE (sdc.idc_final_download_destination);
-  FREE (urid);
+  GNUNET_free (sdc.idc_final_download_destination);
+  GNUNET_free (urid);
 }
 
 struct FCBC

Modified: gnunet-gtk/src/plugins/fs/download.h
===================================================================
--- gnunet-gtk/src/plugins/fs/download.h        2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/fs/download.h        2007-11-23 11:57:34 UTC (rev 
5743)
@@ -39,7 +39,7 @@
                                    const ECRS_FileInfo * fi,
                                    const char *filename,
                                    unsigned long long completed,
-                                   cron_t eta, FSUI_State state);
+                                   GNUNET_CronTime eta, FSUI_State state);
 
 void fs_download_update (DownloadList * downloadContext,
                          unsigned long long completed,

Modified: gnunet-gtk/src/plugins/fs/extensions/musicinsert.c
===================================================================
--- gnunet-gtk/src/plugins/fs/extensions/musicinsert.c  2007-11-23 11:51:54 UTC 
(rev 5742)
+++ gnunet-gtk/src/plugins/fs/extensions/musicinsert.c  2007-11-23 11:57:34 UTC 
(rev 5743)
@@ -349,7 +349,7 @@
       (g_list_find_custom
        (ArtistList, keywords[3], (GCompareFunc) strcmp) == NULL))
     {
-      ArtistList = g_list_append (ArtistList, STRDUP (keywords[3]));
+      ArtistList = g_list_append (ArtistList, GNUNET_strdup (keywords[3]));
       gtk_combo_box_append_text (GTK_COMBO_BOX (artistcombobox), keywords[3]);
     }
 
@@ -359,7 +359,7 @@
       (g_list_find_custom
        (AlbumList, keywords[4], (GCompareFunc) strcmp)) == NULL)
     {
-      AlbumList = g_list_append (AlbumList, STRDUP (keywords[4]));
+      AlbumList = g_list_append (AlbumList, GNUNET_strdup (keywords[4]));
       gtk_combo_box_append_text (GTK_COMBO_BOX (albumcombobox), keywords[4]);
     }
 
@@ -369,7 +369,7 @@
     {
       if ((g_list_find_custom
            (TypeList, keywords[5], (GCompareFunc) strcmp)) == NULL)
-        TypeList = g_list_append (TypeList, STRDUP (keywords[5]));
+        TypeList = g_list_append (TypeList, GNUNET_strdup (keywords[5]));
 
       if (strcmp (keywords[5], "application/ogg") == 0)
         gtk_combo_box_set_active (GTK_COMBO_BOX (typecombobox), FORMAT_OGG);
@@ -382,7 +382,7 @@
     }
   else
     {
-      TypeList = g_list_append (TypeList, STRDUP ("unspecified"));
+      TypeList = g_list_append (TypeList, GNUNET_strdup ("unspecified"));
     }
 
   keywords[6] =
@@ -480,7 +480,7 @@
                                       &fileiter))
     {
       gchar *error_message =
-        STRDUP (_
+        GNUNET_strdup (_
                 ("No files to insert ! Please add files to the list before 
validating."));
       GtkWidget *message_dialog =
         gtk_message_dialog_new (GTK_WINDOW (musicinsertdialog),
@@ -490,7 +490,7 @@
                                 "%s", error_message);
       gtk_dialog_run (GTK_DIALOG (message_dialog));
       gtk_widget_destroy (message_dialog);
-      FREE (error_message);
+      GNUNET_free (error_message);
       return FALSE;
     }
 
@@ -609,7 +609,7 @@
           ECRS_addToMetaData (tempmetadata, EXTRACTOR_KEYWORDS, "music");
         }
 
-      FREE (tempmetas);
+      GNUNET_free (tempmetas);
       i++;
     }
   while (gtk_tree_model_iter_next
@@ -748,7 +748,7 @@
     }
   else
     {
-      gchar *error_message = STRDUP (_("Could not open the directory :\n"));
+      gchar *error_message = GNUNET_strdup (_("Could not open the directory 
:\n"));
       GtkWidget *message_dialog =
         gtk_message_dialog_new (GTK_WINDOW (musicinsertdialog),
                                 GTK_DIALOG_DESTROY_WITH_PARENT,

Modified: gnunet-gtk/src/plugins/fs/fs.c
===================================================================
--- gnunet-gtk/src/plugins/fs/fs.c      2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/plugins/fs/fs.c      2007-11-23 11:57:34 UTC (rev 5743)
@@ -69,12 +69,12 @@
                                         GtkWidget * entryBox)
 {
   const char *time;
-  TIME_T t;
+  GNUNET_Int32Time t;
   GtkEntry *entry;
 
   entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (entryBox)));
   time = gtk_entry_get_text (entry);
-  if (OK != parseTimeInterval (time, &t))
+  if (GNUNET_OK != parseTimeInterval (time, &t))
     {
       gtk_widget_set_sensitive (button, FALSE);
     }
@@ -193,7 +193,7 @@
                                  event->data.DownloadStarted.anonymityLevel,
                                  &event->data.DownloadStarted.fi,
                                  event->data.DownloadStarted.filename,
-                                 0, get_time (), FSUI_ACTIVE);
+                                 0, GNUNET_get_time (), FSUI_ACTIVE);
       break;
     case FSUI_download_resumed:
       ret = fs_download_started (event->data.DownloadResumed.dc.pos,
@@ -368,7 +368,7 @@
                       &iter, UPLOAD_URISTRING, &str, -1);
   clip = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
   gtk_clipboard_set_text (clip, str, strlen (str));
-  FREE (str);
+  GNUNET_free (str);
   return FALSE;
 }
 
@@ -435,7 +435,7 @@
                                                  
"searchNamespaceComboBoxEntry"));
 
   model = gtk_list_store_new (NS_SEARCH_NUM, G_TYPE_STRING,     /* what we 
show */
-                              G_TYPE_STRING,    /* EncName of namespace */
+                              G_TYPE_STRING,    /* GNUNET_EncName of namespace 
*/
                               G_TYPE_POINTER,   /* ECRS MetaData */
                               G_TYPE_INT);      /* Meta-data about namespace */
   gtk_combo_box_set_model (GTK_COMBO_BOX (searchCB), GTK_TREE_MODEL (model));
@@ -652,7 +652,7 @@
   fs_collection_start ();
   fs_namespace_start ();
   ctx = FSUI_start (ectx, cfg, "gnunet-gtk", 8, /* FIXME: allow user to 
configure download parallelism */
-                    YES, &eventProcessor, NULL);
+                    GNUNET_YES, &eventProcessor, NULL);
 }
 
 static void *

Modified: gnunet-gtk/src/plugins/fs/helper.c
===================================================================
--- gnunet-gtk/src/plugins/fs/helper.c  2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/plugins/fs/helper.c  2007-11-23 11:57:34 UTC (rev 5743)
@@ -35,16 +35,16 @@
  * "XX seconds yy days zz months".
  *
  * @param val set to the computed time
- * @return OK on success, SYSERR on error
+ * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
 int
-parseTime (const char *t, TIME_T * param)
+parseTime (const char *t, GNUNET_Int32Time * param)
 {
   int pos;
   int start;
   unsigned int val;
   char *tmp;
-  cron_t ret;
+  GNUNET_CronTime ret;
 
   ret = 0;
   pos = 0;
@@ -54,47 +54,48 @@
       start = pos;
       while ((isdigit (t[pos])) && (t[pos] != '\0'))
         pos++;
-      tmp = STRNDUP (&t[start], pos - start);
+      tmp = GNUNET_strdup (&t[start]);
+      tmp[pos - start] = '\0';
       if (1 != sscanf (tmp, "%u", &val))
         return -1;              /* parse error */
-      FREE (tmp);
+      GNUNET_free (tmp);
       while (t[pos] == ' ')
         pos++;
       start = pos;
       while ((t[pos] != ' ') && (t[pos] != '\0'))
         pos++;
       if (0 == strncasecmp (&t[start], _("ms"), strlen (_("ms"))))
-        ret += cronMILLIS * val;
+        ret += GNUNET_CRON_MILLISECONDS * val;
       if (0 == strncasecmp (&t[start], _("minutes"), strlen (_("minutes"))))
-        ret += cronMINUTES * val;
+        ret += GNUNET_CRON_MINUTES * val;
       else if (0 == strncasecmp (&t[start],
                                  _("seconds"), strlen (_("seconds"))))
-        ret += cronSECONDS * val;
+        ret += GNUNET_CRON_SECONDS * val;
       else if (0 == strncasecmp (&t[start], _("hours"), strlen (_("hours"))))
-        ret += cronHOURS * val;
+        ret += GNUNET_CRON_HOURS * val;
       else if (0 == strncasecmp (&t[start], _("days"), strlen (_("days"))))
-        ret += cronDAYS * val;
+        ret += GNUNET_CRON_DAYS * val;
       else
         if (0 == strncasecmp (&t[start], _("minute"), strlen (_("minute"))))
-        ret += cronMINUTES * val;
+        ret += GNUNET_CRON_MINUTES * val;
       else if (0 == strncasecmp (&t[start],
                                  _("second"), strlen (_("second"))))
-        ret += cronSECONDS * val;
+        ret += GNUNET_CRON_SECONDS * val;
       else if (0 == strncasecmp (&t[start], _("hour"), strlen (_("hour"))))
-        ret += cronHOURS * val;
+        ret += GNUNET_CRON_HOURS * val;
       else if (0 == strncasecmp (&t[start], _("day"), strlen (_("day"))))
-        ret += cronDAYS * val;
+        ret += GNUNET_CRON_DAYS * val;
       else if (0 == strncasecmp (&t[start], "m", strlen ("m")))
-        ret += cronMINUTES * val;
+        ret += GNUNET_CRON_MINUTES * val;
       else if (0 == strncasecmp (&t[start], "s", strlen ("s")))
-        ret += cronSECONDS * val;
+        ret += GNUNET_CRON_SECONDS * val;
       else if (0 == strncasecmp (&t[start], "h", strlen ("h")))
-        ret += cronHOURS * val;
+        ret += GNUNET_CRON_HOURS * val;
       else
-        return SYSERR;          /* parse error */
+        return GNUNET_SYSERR;          /* parse error */
       while (t[pos] == ' ')
         pos++;
     }
-  *param = ret / cronSECONDS;
-  return OK;
+  *param = ret / GNUNET_CRON_SECONDS;
+  return GNUNET_OK;
 }

Modified: gnunet-gtk/src/plugins/fs/helper.h
===================================================================
--- gnunet-gtk/src/plugins/fs/helper.h  2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/plugins/fs/helper.h  2007-11-23 11:57:34 UTC (rev 5743)
@@ -47,8 +47,8 @@
  * "XX seconds yy days zz months".
  *
  * @param val set to the computed time
- * @return OK on success, SYSERR on error
+ * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int parseTime (const char *t, TIME_T * val);
+int parseTime (const char *t, GNUNET_Int32Time * val);
 
 #endif

Modified: gnunet-gtk/src/plugins/fs/meta.c
===================================================================
--- gnunet-gtk/src/plugins/fs/meta.c    2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/plugins/fs/meta.c    2007-11-23 11:57:34 UTC (rev 5743)
@@ -46,7 +46,7 @@
                       &iter,
                       META_TYPE, type,
                       META_STYPE, stype, META_VALUE, data, -1);
-  return OK;
+  return GNUNET_OK;
 }
 
 void
@@ -134,7 +134,7 @@
   gtk_list_store_append (store, &iter);
   gtk_list_store_set (store, &iter, 0, data, -1);
   DEBUG_END ();
-  return OK;
+  return GNUNET_OK;
 }
 
 void
@@ -260,7 +260,7 @@
                       META_TYPE, type,
                       META_STYPE, stype, META_VALUE, value, -1);
   gtk_entry_set_text (GTK_ENTRY (entryLine), "");
-  FREENONNULL (stype);
+  GNUNET_free_non_null (stype);
   DEBUG_END ();
 }
 
@@ -313,7 +313,7 @@
                               &iter,
                               META_TYPE, &type, META_VALUE, &mvalue, -1);
           ECRS_addToMetaData (meta, type, mvalue);
-          FREENONNULL (mvalue);
+          GNUNET_free_non_null (mvalue);
         }
       while (gtk_tree_model_iter_next (metamodel, &iter));
     }
@@ -358,7 +358,7 @@
                                                length);
               free (thumb);
               ECRS_addToMetaData (meta, EXTRACTOR_THUMBNAIL_DATA, binary);
-              FREE (binary);
+              GNUNET_free (binary);
             }
         }
     }
@@ -383,7 +383,7 @@
 
   keywords = NULL;
   ksize = 0;
-  GROW (keywords, ksize, 64);
+  GNUNET_array_grow (keywords, ksize, 64);
   kpos = 0;
   if (gtk_tree_model_get_iter_first (keymodel, &iter))
     {
@@ -392,7 +392,7 @@
           gtk_tree_model_get (keymodel, &iter, 0, &mvalue, -1);
           keywords[kpos++] = mvalue;
           if (kpos == ksize)
-            GROW (keywords, ksize, kpos * 2);
+            GNUNET_array_grow (keywords, ksize, kpos * 2);
         }
       while (gtk_tree_model_iter_next (keymodel, &iter));
     }
@@ -400,39 +400,39 @@
 
   keywordURI = ECRS_keywordsToUri ((const char **) keywords);
   while (kpos > 0)
-    FREE (keywords[--kpos]);
-  GROW (keywords, ksize, 0);
+    GNUNET_free (keywords[--kpos]);
+  GNUNET_array_grow (keywords, ksize, 0);
   DEBUG_END ();
   return keywordURI;
 }
 
 char *
-updateIntervalToString (TIME_T interval)
+updateIntervalToString (GNUNET_Int32Time interval)
 {
   if (interval == ECRS_SBLOCK_UPDATE_SPORADIC)
     return strdup (_("--sporadic update--"));
   if (interval == ECRS_SBLOCK_UPDATE_NONE)
     return strdup (_("--no update--"));
-  return string_get_fancy_time_interval (interval * cronSECONDS);
+  return GNUNET_get_time_interval_as_fancy_string (interval * 
GNUNET_CRON_SECONDS);
 }
 
 int
-parseTimeInterval (const char *timeSpec, TIME_T * interval)
+parseTimeInterval (const char *timeSpec, GNUNET_Int32Time * interval)
 {
   if (timeSpec == NULL)
-    return SYSERR;
+    return GNUNET_SYSERR;
   if (0 == strcmp (_("--sporadic update--"), timeSpec))
     *interval = ECRS_SBLOCK_UPDATE_SPORADIC;
   else if (0 == strcmp (_("--no update--"), timeSpec))
     *interval = ECRS_SBLOCK_UPDATE_NONE;
   else
     return parseTime (timeSpec, interval);
-  return OK;
+  return GNUNET_OK;
 }
 
 int
 tryParseTimeInterval (GladeXML * xml,
-                      const char *intervalComboBoxEntry, TIME_T * interval)
+                      const char *intervalComboBoxEntry, GNUNET_Int32Time * 
interval)
 {
   return parseTimeInterval (getEntryLineValue (xml,
                                                intervalComboBoxEntry),
@@ -457,7 +457,7 @@
 
   mime = ECRS_getFromMetaData (meta, EXTRACTOR_MIMETYPE);
   if (mime == NULL)
-    mime = STRDUP (_("unknown"));
+    mime = GNUNET_strdup (_("unknown"));
   return validate_utf8 (mime);
 }
 
@@ -477,7 +477,7 @@
                                     EXTRACTOR_UNKNOWN, -1);
   if (name == NULL)
     {
-      name = STRDUP (_("no name given"));
+      name = GNUNET_strdup (_("no name given"));
     }
   else
     {
@@ -503,7 +503,7 @@
                                     EXTRACTOR_FORMAT,
                                     EXTRACTOR_SIZE, EXTRACTOR_KEYWORDS, -1);
   if (desc == NULL)
-    desc = STRDUP ("");
+    desc = GNUNET_strdup ("");
   return validate_utf8 (desc);
 }
 
@@ -531,7 +531,7 @@
     {
       pixbuf = NULL;
     }
-  FREENONNULL (thumb);
+  GNUNET_free_non_null (thumb);
   return pixbuf;
 }
 

Modified: gnunet-gtk/src/plugins/fs/meta.h
===================================================================
--- gnunet-gtk/src/plugins/fs/meta.h    2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/plugins/fs/meta.h    2007-11-23 11:57:34 UTC (rev 5743)
@@ -58,13 +58,13 @@
 
 struct ECRS_URI *getKeywordURIFromList (GladeXML * xml, const char *name);
 
-char *updateIntervalToString (TIME_T interval);
+char *updateIntervalToString (GNUNET_Int32Time interval);
 
 int tryParseTimeInterval (GladeXML * xml,
                           const char *intervalComboBoxEntry,
-                          TIME_T * interval);
+                          GNUNET_Int32Time * interval);
 
-int parseTimeInterval (const char *frequency, TIME_T * interval);
+int parseTimeInterval (const char *frequency, GNUNET_Int32Time * interval);
 
 char *getMimeTypeFromMetaData (const struct ECRS_MetaData *meta);
 

Modified: gnunet-gtk/src/plugins/fs/namespace.c
===================================================================
--- gnunet-gtk/src/plugins/fs/namespace.c       2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/fs/namespace.c       2007-11-23 11:57:34 UTC (rev 
5743)
@@ -49,7 +49,7 @@
   GtkWidget *updateButton;
   GtkTreeModel *model;
   char *name;
-  HashCode512 id;
+  GNUNET_HashCode id;
   struct ECRS_MetaData *meta;
 } NamespaceList;
 
@@ -95,7 +95,7 @@
                               &iter, IN_NAMESPACE_PUB_DATE_STRING, &freq, -1);
           if ((freq != NULL) && (0 != strcmp (freq, _("never"))))
             ok = 1;
-          FREENONNULL (freq);
+          GNUNET_free_non_null (freq);
         }
       gtk_widget_set_sensitive (list->updateButton, ok);
       list = list->next;
@@ -295,15 +295,15 @@
  * @param publicationFrequency how often are updates scheduled?
  * @param nextPublicationTime the scheduled time for the
  *  next update (0 for sporadic updates)
- * @return OK to continue iteration, SYSERR to abort
+ * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
  */
 static int
 addNamespaceContentToModel (void *cls,
                             const ECRS_FileInfo * fi,
-                            const HashCode512 * lastId,
-                            const HashCode512 * nextId,
-                            TIME_T publicationFrequency,
-                            TIME_T nextPublicationTime)
+                            const GNUNET_HashCode * lastId,
+                            const GNUNET_HashCode * nextId,
+                            GNUNET_Int32Time publicationFrequency,
+                            GNUNET_Int32Time nextPublicationTime)
 {
   GtkListStore *model = GTK_LIST_STORE (cls);
   GtkTreeIter iter;
@@ -311,8 +311,8 @@
   char *desc;
   char *mime;
   char *uriString;
-  EncName last;
-  EncName next;
+  GNUNET_EncName last;
+  GNUNET_EncName next;
   char *freq;
   char *date;
   unsigned long long size;
@@ -329,7 +329,7 @@
                                         EXTRACTOR_PRODUCER,
                                         EXTRACTOR_UNKNOWN, -1);
   if (filename == NULL)
-    filename = STRDUP (_("no name given"));
+    filename = GNUNET_strdup (_("no name given"));
   else
     {
       char *dotdot;
@@ -346,31 +346,31 @@
                                     EXTRACTOR_FORMAT,
                                     EXTRACTOR_SIZE, EXTRACTOR_KEYWORDS, -1);
   if (desc == NULL)
-    desc = STRDUP ("");
+    desc = GNUNET_strdup ("");
   mime = ECRS_getFromMetaData (fi->meta, EXTRACTOR_MIMETYPE);
   if (mime == NULL)
-    mime = STRDUP (_("unknown"));
+    mime = GNUNET_strdup (_("unknown"));
   if (ECRS_isFileUri (fi->uri))
     size = ECRS_fileSize (fi->uri);
   else
     size = 0;
   uriString = ECRS_uriToString (fi->uri);
-  hash2enc (lastId, &last);
+  GNUNET_hash_to_enc (lastId, &last);
   if (nextId != NULL)
-    hash2enc (nextId, &next);
+    GNUNET_hash_to_enc (nextId, &next);
   else
-    memset (&next, 0, sizeof (EncName));
+    memset (&next, 0, sizeof (GNUNET_EncName));
   if (publicationFrequency == ECRS_SBLOCK_UPDATE_SPORADIC)
-    date = STRDUP (_("unspecified"));
+    date = GNUNET_strdup (_("unspecified"));
   else if (publicationFrequency == ECRS_SBLOCK_UPDATE_NONE)
-    date = STRDUP (_("never"));
+    date = GNUNET_strdup (_("never"));
   else
-    date = GN_CTIME (&nextPublicationTime);
+    date = GNUNET_int32_time_to_string (&nextPublicationTime);
   if (date[strlen (date) - 1] == '\n')
     date[strlen (date) - 1] = '\0';
 
   freq = updateIntervalToString (publicationFrequency);
-  size_h = string_get_fancy_byte_size (size);
+  size_h = GNUNET_get_byte_size_as_fancy_string (size);
   gtk_list_store_append (model, &iter);
   gtk_list_store_set (model,
                       &iter,
@@ -385,14 +385,14 @@
                       IN_NAMESPACE_PUB_DATE_STRING, date,
                       IN_NAMESPACE_URI, ECRS_dupUri (fi->uri),
                       IN_NAMESPACE_META, ECRS_dupMetaData (fi->meta), -1);
-  FREE (size_h);
-  FREE (filename);
-  FREE (uriString);
-  FREE (freq);
-  FREE (date);
-  FREE (mime);
+  GNUNET_free (size_h);
+  GNUNET_free (filename);
+  GNUNET_free (uriString);
+  GNUNET_free (freq);
+  GNUNET_free (date);
+  GNUNET_free (mime);
   DEBUG_END ();
-  return OK;
+  return GNUNET_OK;
 }
 
 /**
@@ -401,7 +401,7 @@
 int
 addTabForNamespace (void *unused,
                     const char *namespaceName,
-                    const HashCode512 * namespaceId,
+                    const GNUNET_HashCode * namespaceId,
                     const struct ECRS_MetaData *md, int rating)
 {
   NamespaceList *list;
@@ -409,12 +409,12 @@
   GtkWidget *notebook;
   GtkWidget *del_menu;
 
-  if (OK != ECRS_testNamespaceExists (NULL, cfg, namespaceName, namespaceId))
-    return OK;
+  if (GNUNET_OK != ECRS_testNamespaceExists (NULL, cfg, namespaceName, 
namespaceId))
+    return GNUNET_OK;
   DEBUG_BEGIN ();
   label = gtk_label_new (namespaceName);
-  list = MALLOC (sizeof (NamespaceList));
-  list->name = STRDUP (namespaceName);
+  list = GNUNET_malloc (sizeof (NamespaceList));
+  list->name = GNUNET_strdup (namespaceName);
   list->id = *namespaceId;
   list->meta = ECRS_dupMetaData (md);
   makeNamespaceFrame (list);
@@ -433,7 +433,7 @@
 
   del_menu = glade_xml_get_widget (getMainXML (), "namespaceDelete");
   gtk_widget_set_sensitive (del_menu, TRUE);
-  return OK;
+  return GNUNET_OK;
 }
 
 
@@ -467,7 +467,7 @@
     head = pos->next;
   else
     prev->next = pos->next;
-  FREE (pos->name);
+  GNUNET_free (pos->name);
   ECRS_freeMetaData (pos->meta);
   if (gtk_tree_model_get_iter_first (pos->model, &iter))
     {
@@ -488,7 +488,7 @@
         }
       while (gtk_tree_model_iter_next (pos->model, &iter));
     }
-  FREE (pos);
+  GNUNET_free (pos);
   del_menu = glade_xml_get_widget (getMainXML (), "namespaceDelete");
   gtk_widget_set_sensitive (del_menu, head != NULL);
 }
@@ -559,10 +559,10 @@
 {
   unsigned int anonymityLevel;
   char *namespaceName;
-  TIME_T updateInterval;
-  HashCode512 *lastId;
-  HashCode512 thisId;
-  HashCode512 *nextId;
+  GNUNET_Int32Time updateInterval;
+  GNUNET_HashCode *lastId;
+  GNUNET_HashCode thisId;
+  GNUNET_HashCode *nextId;
 } IUC;
 
 /**
@@ -590,7 +590,7 @@
       return;
     }
   resultURI = NS_addToNamespace (ectx, cfg, cls->anonymityLevel, 1000,  /* 
FIXME: priority */
-                                 get_time () + 2 * cronYEARS,   /* FIXME: 
expiration */
+                                 GNUNET_get_time () + 2 * GNUNET_CRON_YEARS,   
/* FIXME: expiration */
                                  cls->namespaceName,
                                  cls->updateInterval,
                                  cls->lastId,
@@ -614,13 +614,13 @@
                                       &cls->thisId,
                                       cls->nextId,
                                       cls->updateInterval,
-                                      cls->updateInterval + TIME (NULL));
+                                      cls->updateInterval + 
GNUNET_get_time_int32 (NULL));
         }
       ECRS_freeUri (resultURI);
     }
   else
     {
-      infoMessage (YES,
+      infoMessage (GNUNET_YES,
                    _("Failed to insert content into namespace "
                      "(consult logs).\n"));
     }
@@ -654,7 +654,7 @@
   GtkWidget *notebook;
   GtkWidget *dialog;
   GtkWidget *updateIntervalComboBox;
-  HashCode512 nextId;
+  GNUNET_HashCode nextId;
   IUC cls;
   gint num;
 
@@ -686,11 +686,11 @@
 
   if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK)
     {
-      if (OK != tryParseTimeInterval (metaXML,
+      if (GNUNET_OK != tryParseTimeInterval (metaXML,
                                       "updateIntervalComboBoxEntry",
                                       &cls.updateInterval))
         {
-          /* this should be impossible - OK button is
+          /* this should be impossible - GNUNET_OK button is
              deactivated while parse errors are there */
           gtk_widget_destroy (dialog);
           UNREF (metaXML);
@@ -711,7 +711,7 @@
       identifierName = gtk_entry_get_text (GTK_ENTRY (nameLine));
       if (identifierName == NULL)
         identifierName = "";
-      hash (identifierName, strlen (identifierName), &cls.thisId);
+      GNUNET_hash (identifierName, strlen (identifierName), &cls.thisId);
       cls.lastId = NULL;
 
       nameLine = glade_xml_get_widget (metaXML, "nextIdentifierEntry");
@@ -722,7 +722,7 @@
         }
       else
         {
-          hash (identifierName, strlen (identifierName), &nextId);
+          GNUNET_hash (identifierName, strlen (identifierName), &nextId);
           cls.nextId = &nextId;
         }
       ggc_tree_selection_selected_foreach
@@ -743,14 +743,14 @@
 {
   NamespaceList *list;
   GtkTreeIter iter;
-  HashCode512 nextId;
-  HashCode512 lastId;
+  GNUNET_HashCode nextId;
+  GNUNET_HashCode lastId;
   GtkTreeSelection *selection;
   IUC cls;
   char *last;
   char *next;
   char *freq;
-  EncName nextnext;
+  GNUNET_EncName nextnext;
   GtkWidget *nextEntryLine;
   GtkWidget *identifierLabel;
   GtkWidget *updateIntervalComboBox;
@@ -795,7 +795,7 @@
       GE_BREAK (NULL, 0);
       return;
     }
-  if (OK != parseTimeInterval (freq, &cls.updateInterval))
+  if (GNUNET_OK != parseTimeInterval (freq, &cls.updateInterval))
     {
       GE_BREAK (ectx, 0);
       cls.updateInterval = ECRS_SBLOCK_UPDATE_SPORADIC;
@@ -810,19 +810,19 @@
   gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
   identifierLabel = glade_xml_get_widget (metaXML, "identifierLabel");
   gtk_label_set_text (GTK_LABEL (identifierLabel), next);
-  enc2hash (last, &lastId);
+  GNUNET_enc_to_hash (last, &lastId);
   cls.lastId = &lastId;
-  enc2hash (next, &cls.thisId);
+  GNUNET_enc_to_hash (next, &cls.thisId);
 
   nextEntryLine = glade_xml_get_widget (metaXML, "nextIdentifierEntry");
   if ((cls.updateInterval != ECRS_SBLOCK_UPDATE_SPORADIC) &&
-      (OK == NS_computeNextId (NULL,
+      (GNUNET_OK == NS_computeNextId (NULL,
                                cfg,
                                cls.namespaceName,
                                &lastId,
                                &cls.thisId, cls.updateInterval, &nextId)))
     {
-      hash2enc (&nextId, &nextnext);
+      GNUNET_hash_to_enc (&nextId, &nextnext);
       gtk_entry_set_text (GTK_ENTRY (nextEntryLine), (char *) &nextnext);
       gtk_widget_set_sensitive (nextEntryLine, FALSE);
     }
@@ -844,15 +844,15 @@
   nn_str = gtk_entry_get_text (GTK_ENTRY (nextEntryLine));
   if (nn_str == NULL)
     nn_str = "";
-  hash (nn_str, strlen (nn_str), &nextId);
+  GNUNET_hash (nn_str, strlen (nn_str), &nextId);
   cls.nextId = &nextId;
 
-  if (OK != tryParseTimeInterval (metaXML,
+  if (GNUNET_OK != tryParseTimeInterval (metaXML,
                                   "namespaceUpdateIntervalComboBoxEntry",
                                   &cls.updateInterval))
     {
       /* This should be impossible since the
-         the OK button is deactivated while parse errors are present */
+         the GNUNET_OK button is deactivated while parse errors are present */
       mdialog = gtk_message_dialog_new
         (NULL,
          GTK_DIALOG_MODAL,
@@ -896,7 +896,7 @@
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (trackCheckButton),
                                 URITRACK_trackStatus (ectx,
                                                       cfg) ==
-                                YES ? TRUE : FALSE);
+                                GNUNET_YES ? TRUE : FALSE);
 
   contentList = glade_xml_get_widget (getMainXML (), "availableContentList");
 

Modified: gnunet-gtk/src/plugins/fs/namespace.h
===================================================================
--- gnunet-gtk/src/plugins/fs/namespace.h       2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/fs/namespace.h       2007-11-23 11:57:34 UTC (rev 
5743)
@@ -32,7 +32,7 @@
  */
 int addTabForNamespace (void *unused,
                         const char *namespaceName,
-                        const HashCode512 * namespaceId,
+                        const GNUNET_HashCode * namespaceId,
                         const struct ECRS_MetaData *md, int rating);
 
 

Modified: gnunet-gtk/src/plugins/fs/namespace_create.c
===================================================================
--- gnunet-gtk/src/plugins/fs/namespace_create.c        2007-11-23 11:51:54 UTC 
(rev 5742)
+++ gnunet-gtk/src/plugins/fs/namespace_create.c        2007-11-23 11:57:34 UTC 
(rev 5743)
@@ -170,8 +170,8 @@
   struct ECRS_MetaData *meta;
   struct ECRS_URI *keywordURI;
   struct ECRS_URI *root;
-  HashCode512 namespaceId;
-  HashCode512 rootEntry;
+  GNUNET_HashCode namespaceId;
+  GNUNET_HashCode rootEntry;
 
   DEBUG_BEGIN ();
   metaXML
@@ -214,11 +214,11 @@
       namespaceName = gtk_entry_get_text (GTK_ENTRY (nameLine));
       if (namespaceName == NULL)
         namespaceName = "root"; /* do NOT translate "root"! */
-      hash (namespaceName, strlen (namespaceName), &rootEntry);
+      GNUNET_hash (namespaceName, strlen (namespaceName), &rootEntry);
       nameLine = glade_xml_get_widget (metaXML, "namespaceNameEntry");
       namespaceName = gtk_entry_get_text (GTK_ENTRY (nameLine));
       root = NS_createNamespace (ectx, cfg, gtk_spin_button_get_value_as_int 
(GTK_SPIN_BUTTON (spin)), 1000,    /* FIXME: priority */
-                                 get_time () + 2 * cronYEARS,   /* FIXME: 
expiration */
+                                 GNUNET_get_time () + 2 * GNUNET_CRON_YEARS,   
/* FIXME: expiration */
                                  namespaceName, meta, keywordURI, &rootEntry);
       if (root != NULL)
         {

Modified: gnunet-gtk/src/plugins/fs/namespace_search.c
===================================================================
--- gnunet-gtk/src/plugins/fs/namespace_search.c        2007-11-23 11:51:54 UTC 
(rev 5742)
+++ gnunet-gtk/src/plugins/fs/namespace_search.c        2007-11-23 11:57:34 UTC 
(rev 5743)
@@ -90,7 +90,7 @@
     }
   else
     {
-      /* FIXME: if enc2hash succeeds, we may want to keep this
+      /* FIXME: if GNUNET_enc_to_hash succeeds, we may want to keep this
          active */
       gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), 0);
       gtk_widget_set_sensitive (spin, FALSE);
@@ -120,9 +120,9 @@
   int rating;
   char *encStr;
   char *descStr;
-  HashCode512 ns;
-  HashCode512 root;
-  EncName enc;
+  GNUNET_HashCode ns;
+  GNUNET_HashCode root;
+  GNUNET_EncName enc;
 
   DEBUG_BEGIN ();
   spin = glade_xml_get_widget (getMainXML (), "namespaceRatingSpinButton");
@@ -144,15 +144,15 @@
         }
       else if (encStr != NULL)
         {
-          enc2hash (encStr, &ns);
+          GNUNET_enc_to_hash (encStr, &ns);
           gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), rating);
           gtk_widget_set_sensitive (spin, TRUE);
           keyword
             = glade_xml_get_widget (getMainXML (),
                                     "fssearchKeywordComboBoxEntry");
-          if (OK == NS_getNamespaceRoot (ectx, cfg, encStr, &root))
+          if (GNUNET_OK == NS_getNamespaceRoot (ectx, cfg, encStr, &root))
             {
-              hash2enc (&root, &enc);
+              GNUNET_hash_to_enc (&root, &enc);
               gtk_entry_set_text (GTK_ENTRY
                                   (gtk_bin_get_child (GTK_BIN (keyword))),
                                   (const gchar *) &enc);
@@ -180,7 +180,7 @@
 struct NewNamespaceInfo
 {
   const char *namespaceName;
-  const HashCode512 *namespaceId;
+  const GNUNET_HashCode *namespaceId;
   const struct ECRS_MetaData *md;
   int rating;
 };
@@ -192,7 +192,7 @@
 
   GtkListStore *model;
   GtkTreeIter iter;
-  EncName enc;
+  GNUNET_EncName enc;
   char *name;
   struct ECRS_MetaData *dmd;
   GtkWidget *ncbe;
@@ -204,11 +204,11 @@
   DEBUG_BEGIN ();
   ncbe = glade_xml_get_widget (getMainXML (), "searchNamespaceComboBoxEntry");
   model = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (ncbe)));
-  hash2enc (nni->namespaceId, &enc);
+  GNUNET_hash_to_enc (nni->namespaceId, &enc);
   if (nni->md == NULL)
     {
       dmd = NULL;
-      desc = STRDUP ("");
+      desc = GNUNET_strdup ("");
     }
   else
     {
@@ -226,14 +226,14 @@
                                         EXTRACTOR_SUMMARY,
                                         EXTRACTOR_OWNER, -1);
       if (desc == NULL)
-        desc = STRDUP ("");
+        desc = GNUNET_strdup ("");
     }
 
   n = strlen (desc) + 64;
-  name = MALLOC (n);
-  SNPRINTF (name, n, "%s: %.*s", desc, 20, &enc);
+  name = GNUNET_malloc (n);
+  GNUNET_snprintf (name, n, "%s: %.*s", desc, 20, &enc);
   /* check if present! */
-  found = NO;
+  found = GNUNET_NO;
   if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter))
     {
       do
@@ -242,15 +242,15 @@
                               &iter, NS_SEARCH_ENCNAME, &encName, -1);
           if ((encName != NULL) &&
               (0 == strcmp (encName, (const char *) &enc)))
-            found = YES;
-          FREENONNULL (encName);
+            found = GNUNET_YES;
+          GNUNET_free_non_null (encName);
         }
-      while ((found == NO) &&
+      while ((found == GNUNET_NO) &&
              (gtk_tree_model_iter_next (GTK_TREE_MODEL (model), &iter)));
     }
-  if (found == NO)
+  if (found == GNUNET_NO)
     {
-      infoMessage (YES, _("Namespace found: %s - %.*s\n"), desc, 20, &enc);
+      infoMessage (GNUNET_YES, _("Namespace found: %s - %.*s\n"), desc, 20, 
&enc);
       gtk_list_store_append (model, &iter);
       gtk_list_store_set (model,
                           &iter,
@@ -259,7 +259,7 @@
                           NS_SEARCH_METADATA, dmd,
                           NS_SEARCH_RATING, nni->rating, -1);
     }
-  FREE (name);
+  GNUNET_free (name);
   DEBUG_END ();
 
   return NULL;
@@ -275,12 +275,12 @@
  *
  * @param cls pass NULL
  * @param rating the local rating of the namespace
- * @return OK (always)
+ * @return GNUNET_OK (always)
  */
 int
 namespace_discovered_cb (void *cls,
                          const char *namespaceName,
-                         const HashCode512 * namespaceId,
+                         const GNUNET_HashCode * namespaceId,
                          const struct ECRS_MetaData *md, int rating)
 {
   struct NewNamespaceInfo nni;
@@ -289,5 +289,5 @@
   nni.md = md;
   nni.rating = rating;
   gtkSaveCall (&saveDiscovery, &nni);
-  return OK;
+  return GNUNET_OK;
 }

Modified: gnunet-gtk/src/plugins/fs/namespace_search.h
===================================================================
--- gnunet-gtk/src/plugins/fs/namespace_search.h        2007-11-23 11:51:54 UTC 
(rev 5742)
+++ gnunet-gtk/src/plugins/fs/namespace_search.h        2007-11-23 11:57:34 UTC 
(rev 5743)
@@ -34,11 +34,11 @@
  *
  * @param cls pass NULL
  * @param rating the local rating of the namespace
- * @return OK (always)
+ * @return GNUNET_OK (always)
  */
 int namespace_discovered_cb (void *cls,
                              const char *namespaceName,
-                             const HashCode512 * namespaceId,
+                             const GNUNET_HashCode * namespaceId,
                              const struct ECRS_MetaData *md, int rating);
 
 

Modified: gnunet-gtk/src/plugins/fs/search.c
===================================================================
--- gnunet-gtk/src/plugins/fs/search.c  2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/plugins/fs/search.c  2007-11-23 11:57:34 UTC (rev 5743)
@@ -94,7 +94,7 @@
   label = GTK_LABEL (glade_xml_get_widget (searchContext->labelXML,
                                            "searchTabLabel"));
   gtk_label_set (label, new_title);
-  FREE (new_title);
+  GNUNET_free (new_title);
 }
 
 /**
@@ -121,7 +121,7 @@
   size = ECRS_isFileUri (info->uri)
     || ECRS_isLocationUri (info->uri) ? ECRS_fileSize (info->uri) : 0;
   pixbuf = getThumbnailFromMetaData (info->meta);
-  size_h = string_get_fancy_byte_size (size);
+  size_h = GNUNET_get_byte_size_as_fancy_string (size);
   gtk_tree_store_set (searchContext->tree,
                       iter,
                       SEARCH_NAME, name,
@@ -138,10 +138,10 @@
                       SEARCH_INTERNAL_PARENT, downloadParent, -1);
   if (pixbuf != NULL)
     g_object_unref(pixbuf);
-  FREE (size_h);
-  FREE (name);
-  FREE (desc);
-  FREE (mime);
+  GNUNET_free (size_h);
+  GNUNET_free (name);
+  GNUNET_free (desc);
+  GNUNET_free (mime);
 }
 
 /**
@@ -164,9 +164,9 @@
   state = URITRACK_getState (ectx, cfg, info->uri);
   if ((state & (URITRACK_INSERTED |
                 URITRACK_INDEXED)) &&
-      (YES == GC_get_configuration_value_yesno (cfg,
+      (GNUNET_YES == GC_get_configuration_value_yesno (cfg,
                                                 "GNUNET-GTK",
-                                                "DISABLE-OWN", YES)))
+                                                "DISABLE-OWN", GNUNET_YES)))
     return;
   model = GTK_TREE_STORE (gtk_tree_view_get_model (searchContext->treeview));
   gtk_tree_store_append (model, &iter, NULL);
@@ -208,7 +208,7 @@
   str = ECRS_uriToString (uri);
   clip = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
   gtk_clipboard_set_text (clip, str, strlen (str));
-  FREE (str);
+  GNUNET_free (str);
   return FALSE;
 }
 
@@ -274,12 +274,12 @@
     return FALSE;
   fis = NULL;
   fis_size = 0;
-  GROW (fis, fis_size, list->resultsReceived);
+  GNUNET_array_grow (fis, fis_size, list->resultsReceived);
   pos = 0;
   do
     {
       if (pos == fis_size)
-        GROW (fis, fis_size, pos + 1);
+        GNUNET_array_grow (fis, fis_size, pos + 1);
       gtk_tree_model_get (model,
                           &iter,
                           SEARCH_URI, &fis[pos].uri,
@@ -291,24 +291,24 @@
   ECRS_addToMetaData (meta, EXTRACTOR_KEYWORDS, list->searchString);
   ECRS_addToMetaData (meta, EXTRACTOR_DESCRIPTION, _("Saved search results"));
   ECRS_addToMetaData (meta, EXTRACTOR_SOFTWARE, "gnunet-gtk");
-  if (OK != ECRS_createDirectory (NULL,
+  if (GNUNET_OK != ECRS_createDirectory (NULL,
                                   &directory, &dir_len, fis_size, fis, meta))
     {
       addLogEntry (_("Internal error."));
       GE_BREAK (NULL, 0);
       ECRS_freeMetaData (meta);
-      GROW (fis, fis_size, 0);
-      FREE (name);
+      GNUNET_array_grow (fis, fis_size, 0);
+      GNUNET_free (name);
       return FALSE;
     }
   ECRS_freeMetaData (meta);
-  GROW (fis, fis_size, 0);
-  if (OK != disk_file_write (NULL, name, directory, dir_len, "644"))
+  GNUNET_array_grow (fis, fis_size, 0);
+  if (GNUNET_OK != GNUNET_disk_file_write (NULL, name, directory, dir_len, 
"644"))
     {
       addLogEntry (_("Error writing file `%s'."), name);
     }
-  FREE (directory);
-  FREE (name);
+  GNUNET_free (directory);
+  GNUNET_free (name);
   return FALSE;
 }
 
@@ -388,9 +388,9 @@
   else if (0 == strncmp (dhead,
                          ECRS_SUBSPACE_INFIX, strlen (ECRS_SUBSPACE_INFIX)))
     dhead = &dhead[strlen (ECRS_SUBSPACE_INFIX)];
-  list = MALLOC (sizeof (SearchList));
+  list = GNUNET_malloc (sizeof (SearchList));
   memset (list, 0, sizeof (SearchList));
-  list->searchString = STRDUP (dhead);
+  list->searchString = GNUNET_strdup (dhead);
   list->uri = ECRS_dupUri (uri);
   list->fsui_list = fsui_list;
   list->next = search_head;
@@ -477,9 +477,9 @@
   gtk_tree_view_column_set_reorderable (column, TRUE);
   gtk_tree_view_column_set_sort_column_id (column, SEARCH_MIME);
 
-  if (YES != GC_get_configuration_value_yesno (cfg,
+  if (GNUNET_YES != GC_get_configuration_value_yesno (cfg,
                                                "GNUNET-GTK",
-                                               "DISABLE-PREVIEWS", NO))
+                                               "DISABLE-PREVIEWS", GNUNET_NO))
     {
       renderer = gtk_cell_renderer_pixbuf_new ();
       col = gtk_tree_view_insert_column_with_attributes (list->treeview,
@@ -520,7 +520,7 @@
                       SEARCH_SUMMARY_NAME, dhead,
                       SEARCH_SUMMARY_RESULT_COUNT, 0,
                       SEARCH_SUMMARY_INTERNAL, list, -1);
-  FREE (description);
+  GNUNET_free (description);
   path = gtk_tree_model_get_path (GTK_TREE_MODEL (search_summary), &iter);
   list->summaryViewRowReference
     = gtk_tree_row_reference_new (GTK_TREE_MODEL (search_summary), path);
@@ -652,9 +652,9 @@
   UNREF (list->searchXML);
   UNREF (list->labelXML);
   gtk_tree_row_reference_free (list->summaryViewRowReference);
-  FREE (list->searchString);
+  GNUNET_free (list->searchString);
   ECRS_freeUri (list->uri);
-  FREE (list);
+  GNUNET_free (list);
 }
 
 /* ****************** User event handling ************* */
@@ -681,7 +681,7 @@
 {
   unsigned int anonymity;
   unsigned int max;
-  cron_t delay;
+  GNUNET_CronTime delay;
   struct ECRS_URI *uri;
 } FSSS;
 
@@ -757,15 +757,15 @@
         }
       else
         {
-          GE_ASSERT (ectx, strlen (ns) == sizeof (EncName) - 1);
+          GE_ASSERT (ectx, strlen (ns) == sizeof (GNUNET_EncName) - 1);
           if ((descStr == NULL) && (ns != NULL))
-            descStr = STRDUP (ns);
+            descStr = GNUNET_strdup (ns);
         }
       if (ns != NULL)
         {
           char *ustring;
 
-          ustring = MALLOC (strlen (searchString) + sizeof (EncName) +
+          ustring = GNUNET_malloc (strlen (searchString) + sizeof 
(GNUNET_EncName) +
                             strlen (ECRS_URI_PREFIX) +
                             strlen (ECRS_SUBSPACE_INFIX) + 10);
           strcpy (ustring, ECRS_URI_PREFIX);
@@ -781,7 +781,7 @@
                       _("Failed to create namespace URI from `%s'.\n"),
                       ustring);
             }
-          FREE (ustring);
+          GNUNET_free (ustring);
         }
       if (descStr != NULL)
         free (descStr);
@@ -821,7 +821,7 @@
                                        "searchAnonymitySelectionSpinButton");
   fsss.max = getSpinButtonValue (getMainXML (), "maxResultsSpinButton");
   fsss.delay = getSpinButtonValue (getMainXML (),
-                                   "searchDelaySpinButton") * cronSECONDS;
+                                   "searchDelaySpinButton") * 
GNUNET_CRON_SECONDS;
   run_with_save_calls (search_start_helper, &fsss);
   ECRS_freeUri (fsss.uri);
 }

Modified: gnunet-gtk/src/plugins/fs/upload.c
===================================================================
--- gnunet-gtk/src/plugins/fs/upload.c  2007-11-23 11:51:54 UTC (rev 5742)
+++ gnunet-gtk/src/plugins/fs/upload.c  2007-11-23 11:57:34 UTC (rev 5743)
@@ -74,7 +74,7 @@
   GtkTreePath *path;
   char *us;
 
-  list->has_terminated = YES;
+  list->has_terminated = GNUNET_YES;
   list->uri = ECRS_dupUri (uri);
   us = ECRS_uriToString (uri);
   path = gtk_tree_row_reference_get_path (list->summaryViewRowReference);
@@ -84,14 +84,14 @@
                      UPLOAD_URISTRING, us,
                      UPLOAD_PROGRESS, 100, 
                      -1);
-  FREE (us);
+  GNUNET_free (us);
 }
 
 void
 fs_upload_error (UploadList * list)
 {
   /* FIXME: indicate error in summary dialog! */
-  list->has_terminated = YES;
+  list->has_terminated = GNUNET_YES;
 }
 
 void
@@ -107,7 +107,7 @@
   gtk_tree_row_reference_free (list->summaryViewRowReference);
   list->summaryViewRowReference = NULL;
   gtk_tree_store_remove (upload_summary, &iter);
-  FREE (list->filename);
+  GNUNET_free (list->filename);
   if (list->uri != NULL)
     {
       ECRS_freeUri (list->uri);
@@ -125,7 +125,7 @@
       else
         GE_BREAK (ectx, 0);
     }
-  FREE (list);
+  GNUNET_free (list);
 }
 
 UploadList *
@@ -143,9 +143,9 @@
   GtkTreeIter par;
   char * u;
 
-  ret = MALLOC (sizeof (UploadList));
+  ret = GNUNET_malloc (sizeof (UploadList));
   memset (ret, 0, sizeof (UploadList));
-  ret->filename = STRDUP (filename);
+  ret->filename = GNUNET_strdup (filename);
   ret->fsui_list = fsui;
   ret->total = total;
   ret->is_top = parent == NULL;
@@ -169,10 +169,10 @@
   if (uri != NULL)
     u = ECRS_uriToString(uri);
   else
-    u = STRDUP("");
+    u = GNUNET_strdup("");
   gtk_tree_store_set (upload_summary, &iter, UPLOAD_FILENAME, filename, 
UPLOAD_PROGRESS, progress, UPLOAD_URISTRING, u,
                       UPLOAD_INTERNAL, ret, -1);
-  FREE(u);
+  GNUNET_free(u);
   path = gtk_tree_model_get_path (GTK_TREE_MODEL (upload_summary), &iter);
   ret->summaryViewRowReference
     = gtk_tree_row_reference_new (GTK_TREE_MODEL (upload_summary), path);
@@ -330,7 +330,7 @@
   int index;
   int extract;
   int deep_index;
-  cron_t expire;
+  GNUNET_CronTime expire;
   struct ECRS_MetaData *meta;
   struct ECRS_URI *gkeywordURI;
   struct ECRS_URI *keywordURI;
@@ -343,7 +343,7 @@
 
   FSUI_startUpload (ctx,
                     fsuc->filename,
-                    (DirectoryScanCallback) & disk_directory_scan,
+                    (DirectoryScanCallback) & GNUNET_disk_directory_scan,
                     ectx,
                     fsuc->anonymity,
                     fsuc->priority,
@@ -372,7 +372,7 @@
   GC_get_configuration_value_string (cfg, "FS", "EXTRACTORS", "", &config);
   if (strlen (config) > 0)
     extractors = EXTRACTOR_loadConfigLibraries (extractors, config);
-  FREE (config);
+  GNUNET_free (config);
   filename = getEntryLineValue (getMainXML (), "uploadFilenameComboBoxEntry");
   metaXML
     = glade_xml_new (getGladeFileName (), "metaDataDialog", PACKAGE_NAME);
@@ -420,7 +420,7 @@
                                            "doExtractCheckButton");
       fsuc.deep_index = getToggleButtonValue (getMainXML (),
                                               "deepIndexCheckButton");
-      fsuc.expire = get_time () + 2 * cronYEARS;
+      fsuc.expire = GNUNET_get_time () + 2 * GNUNET_CRON_YEARS;
       fsuc.meta = getMetaDataFromList (metaXML,
                                        "metaDataDialogMetaDataList",
                                        "previewImage");
@@ -428,9 +428,9 @@
                                                "metaDataDialogKeywordList");
       fsuc.gkeywordURI = ECRS_stringToUri (ectx,
                                            ECRS_URI_PREFIX ECRS_SEARCH_INFIX);
-      fsuc.filename = STRDUP (filename);
+      fsuc.filename = GNUNET_strdup (filename);
       run_with_save_calls (&start_upload_helper, &fsuc);
-      FREE (fsuc.filename);
+      GNUNET_free (fsuc.filename);
       ECRS_freeMetaData (fsuc.meta);
       ECRS_freeUri (fsuc.gkeywordURI);
       ECRS_freeUri (fsuc.keywordURI);
@@ -503,9 +503,9 @@
     oldfilename = getenv ("HOME");
   if (oldfilename == NULL)
     oldfilename = "/";
-  ofn = string_expandFileName (ectx, oldfilename);
+  ofn = GNUNET_expand_file_name (ectx, oldfilename);
   filename = selectFile (ofn);
-  FREE (ofn);
+  GNUNET_free (ofn);
   if (NULL == filename)
     return;
   gtk_entry_set_text (entry, filename);

Modified: gnunet-gtk/src/plugins/peers/Makefile.am
===================================================================
--- gnunet-gtk/src/plugins/peers/Makefile.am    2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/peers/Makefile.am    2007-11-23 11:57:34 UTC (rev 
5743)
@@ -15,10 +15,7 @@
   @GTK_LIBS@ @GNUNETGTK_LIBS@ \
   $(top_builddir)/src/common/libgnunetgtk_common.la \
   -lgnunetutil \
-  -lgnunetutil_cron \
-  -lgnunetutil_config \
   -lgnunetidentity_api \
-  -lgnunetgetoption_api \
-  -lgnunetutil_network_client
+  -lgnunetgetoption_api 
 libgnunetgtkmodule_peers_la_LDFLAGS = \
   -export-dynamic -avoid-version -module

Modified: gnunet-gtk/src/plugins/peers/peers.c
===================================================================
--- gnunet-gtk/src/plugins/peers/peers.c        2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/peers/peers.c        2007-11-23 11:57:34 UTC (rev 
5743)
@@ -29,14 +29,12 @@
 #include <GNUnet/gnunet_directories.h>
 #include <GNUnet/gnunet_getoption_lib.h>
 #include <GNUnet/gnunet_identity_lib.h>
-#include <GNUnet/gnunet_util_config_impl.h>
-#include <GNUnet/gnunet_util_cron.h>
-#include <GNUnet/gnunet_util_network_client.h>
+#include <GNUnet/gnunet_util.h>
 #include <gtk/gtk.h>
 
-#define REFRESH_RATE (15 * cronSECONDS)
+#define REFRESH_RATE (15 * GNUNET_CRON_SECONDS)
 
-static struct CronManager *cron;
+static struct GNUNET_CronManager *cron;
 
 static struct GE_Context *ectx;
 
@@ -60,14 +58,14 @@
 
 static int
 collector (void *data,
-           const PeerIdentity * identity,
+           const GNUNET_PeerIdentity * identity,
            const void *address,
            unsigned int addr_len,
-           cron_t last_message, unsigned int trust, unsigned int bpmFromPeer)
+           GNUNET_CronTime last_message, unsigned int trust, unsigned int 
bpmFromPeer)
 {
   GtkListStore *model = data;
   GtkTreeIter iter;
-  EncName enc;
+  GNUNET_EncName enc;
   GdkPixbuf *ledBuf;
   GdkPixbuf *flagBuf;
   char *cc;
@@ -77,14 +75,14 @@
   char *have;
   char *haddress;
   char *hostname;
-  cron_t now;
+  GNUNET_CronTime now;
   int i;
   int found;
   struct Flags * pos;
 
-  hash2enc (&identity->hashPubKey, &enc);
+  GNUNET_hash_to_enc (&identity->hashPubKey, &enc);
   /* check if same peer is already in model! */
-  found = NO;
+  found = GNUNET_NO;
   if (TRUE == gtk_tree_model_get_iter_first (GTK_TREE_MODEL (model), &iter))
     {
       do
@@ -97,29 +95,29 @@
                 {
                   if (strlen (haddress) > 0)
                     {
-                      FREE (have);
-                      FREE (haddress);
-                      return OK;
+                      GNUNET_free (have);
+                      GNUNET_free (haddress);
+                      return GNUNET_OK;
                     }
-                  found = YES;
+                  found = GNUNET_YES;
                 }
-              FREENONNULL (haddress);
-              FREE (have);
+              GNUNET_free_non_null (haddress);
+              GNUNET_free (have);
             }
         }
-      while ((found == NO) &&
+      while ((found == GNUNET_NO) &&
              (TRUE == gtk_tree_model_iter_next (GTK_TREE_MODEL (model),
                                                 &iter)));
     }
 
-  hostname = network_get_ip_as_string (address, addr_len, YES);
+  hostname = GNUNET_get_ip_as_string (address, addr_len, GNUNET_YES);
   if (hostname == NULL)
-    hostname = STRDUP ("NAT");
+    hostname = GNUNET_strdup ("NAT");
   /* get flag */
   flagBuf = NULL;
   ledBuf = NULL;
   cc = NULL;
-  prefix = STRDUP (hostname);
+  prefix = GNUNET_strdup (hostname);
   if (strstr (prefix, " ") != NULL)
     *strstr (prefix, " ") = '\0';
   cc = prefix;
@@ -148,11 +146,11 @@
        pos = pos->next;
       }
       if (pos == NULL) {      
-       cc = STRDUP (cc);
+       cc = GNUNET_strdup (cc);
        for (i = 0; i < strlen (cc); i++)
          cc[i] = tolower (cc[i]);
-       dir = os_get_installation_path (IPK_DATADIR);
-       fn = MALLOC (strlen (dir) + 32);
+       dir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR);
+       fn = GNUNET_malloc (strlen (dir) + 32);
        strcpy (fn, dir);
        strcat (fn,
                DIR_SEPARATOR_STR ".."
@@ -160,10 +158,10 @@
                DIR_SEPARATOR_STR "flags" DIR_SEPARATOR_STR);
        strcat (fn, cc);
        strcat (fn, ".png");
-       FREE (dir);
+       GNUNET_free (dir);
        flagBuf = gdk_pixbuf_new_from_file (fn, NULL);
-       FREE (fn);
-       pos = MALLOC(sizeof(struct Flags));
+       GNUNET_free (fn);
+       pos = GNUNET_malloc(sizeof(struct Flags));
        pos->cc = cc;
        pos->flag = flagBuf;
        pos->next = flags;
@@ -172,10 +170,10 @@
     }
 
   /* get LED */
-  now = get_time ();
-  if (last_message + 150 * cronSECONDS > now)
+  now = GNUNET_get_time ();
+  if (last_message + 150 * GNUNET_CRON_SECONDS > now)
     ledBuf = green;
-  else if (last_message + 5 * cronMINUTES > now)
+  else if (last_message + 5 * GNUNET_CRON_MINUTES > now)
     ledBuf = yellow;
   else if (bpmFromPeer > 0)
     ledBuf = red;
@@ -183,7 +181,7 @@
     ledBuf = black;
 
   /* add to model */
-  if (found == NO)
+  if (found == GNUNET_NO)
     gtk_list_store_append (model, &iter);
   gtk_list_store_set (model,
                       &iter,
@@ -192,9 +190,9 @@
                       2, bpmFromPeer,
                       3, (const char *) &enc,
                       4, ledBuf, 5, flagBuf, 6, cc, 7, last_message, -1);
-  FREE (prefix);
-  FREE (hostname);
-  return OK;
+  GNUNET_free (prefix);
+  GNUNET_free (hostname);
+  return GNUNET_OK;
 }
 
 
@@ -205,7 +203,7 @@
 static GtkListStore *
 getPeerModel ()
 {
-  struct ClientServerConnection *sock;
+  struct GNUNET_ClientServerConnection *sock;
   GtkListStore *model;
 
   model = gtk_list_store_new (8, G_TYPE_STRING, /* address */
@@ -216,11 +214,11 @@
                               GDK_TYPE_PIXBUF,  /* flag */
                               G_TYPE_STRING,    /* country name */
                               G_TYPE_UINT64);   /* last time seen */
-  sock = client_connection_create (ectx, cfg);
+  sock = GNUNET_client_connection_create (ectx, cfg);
   if (sock != NULL)
     {
-      gnunet_identity_request_peer_infos (sock, &collector, model);
-      connection_destroy (sock);
+      GNUNET_IDENTITY_request_peer_infos (sock, &collector, model);
+      GNUNET_client_connection_destroy (sock);
     }
   return model;
 }
@@ -353,8 +351,8 @@
   gtk_tree_view_column_set_sort_column_id (column, 3);
 
 
-  dir = os_get_installation_path (IPK_DATADIR);
-  fn = MALLOC (strlen (dir) + 32);
+  dir = GNUNET_get_installation_path (GNUNET_IPK_DATADIR);
+  fn = GNUNET_malloc (strlen (dir) + 32);
   strcpy (fn, dir);
   strcat (fn,
           DIR_SEPARATOR_STR ".."
@@ -378,13 +376,13 @@
           DIR_SEPARATOR_STR ".."
           DIR_SEPARATOR_STR "gnunet-gtk" DIR_SEPARATOR_STR "black.png");
   black = gdk_pixbuf_new_from_file (fn, NULL);
-  FREE (fn);
-  FREE (dir);
+  GNUNET_free (fn);
+  GNUNET_free (dir);
 
   tab = glade_xml_get_widget (getMainXML (), "peersScrolledWindow");
   gtk_widget_show (tab);
   cron = gnunet_gtk_get_cron ();
-  cron_add_job (cron, &updatePeerInfo, REFRESH_RATE, REFRESH_RATE, NULL);
+  GNUNET_cron_add_job (cron, &updatePeerInfo, REFRESH_RATE, REFRESH_RATE, 
NULL);
 }
 
 void
@@ -393,7 +391,7 @@
   GtkWidget *w;
   struct Flags * pos;
 
-  cron_del_job (cron, &updatePeerInfo, REFRESH_RATE, NULL);
+  GNUNET_cron_del_job (cron, &updatePeerInfo, REFRESH_RATE, NULL);
   if (red != NULL)
     g_object_unref (red);
   if (green != NULL)
@@ -409,8 +407,8 @@
     pos = flags->next;    
     if (flags->flag != NULL)
       g_object_unref(flags->flag);
-    FREE (flags->cc);
-    FREE(flags);
+    GNUNET_free (flags->cc);
+    GNUNET_free(flags);
     flags = pos;
   }
 }

Modified: gnunet-gtk/src/plugins/stats/Makefile.am
===================================================================
--- gnunet-gtk/src/plugins/stats/Makefile.am    2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/stats/Makefile.am    2007-11-23 11:57:34 UTC (rev 
5743)
@@ -16,9 +16,7 @@
   @GTK_LIBS@ @GNUNETGTK_LIBS@ \
   $(top_builddir)/src/common/libgnunetgtk_common.la \
   -lgnunetutil \
-  -lgnunetutil_cron \
   -lgnunetgetoption_api \
-  -lgnunetstats_api \
-  -lgnunetutil_network_client
+  -lgnunetstats_api 
 libgnunetgtkmodule_stats_la_LDFLAGS = \
   -export-dynamic -avoid-version -module

Modified: gnunet-gtk/src/plugins/stats/functions.c
===================================================================
--- gnunet-gtk/src/plugins/stats/functions.c    2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/stats/functions.c    2007-11-23 11:57:34 UTC (rev 
5743)
@@ -27,15 +27,15 @@
 #include <GNUnet/gnunet_protocols.h>
 #include "functions.h"
 
-#define FUNCTIONS_DEBUG NO
+#define FUNCTIONS_DEBUG GNUNET_NO
 
 static StatPair *lastStatValues;
 
 static unsigned int lsv_size;
 
-static struct ClientServerConnection *sock;
+static struct GNUNET_ClientServerConnection *sock;
 
-static struct MUTEX *lock;
+static struct GNUNET_Mutex *lock;
 
 static long connectionGoal;
 
@@ -47,12 +47,12 @@
 
 static struct GC_Configuration *cfg;
 
-static struct CronManager *cron;
+static struct GNUNET_CronManager *cron;
 
 static int
 getStatValue (long long *value,
               long long *lvalue,
-              cron_t * dtime, const char *optName, int monotone)
+              GNUNET_CronTime * dtime, const char *optName, int monotone)
 {
   unsigned int i;
 
@@ -68,9 +68,9 @@
             *lvalue = lastStatValues[i].lvalue;
           if (dtime != NULL)
             *dtime = lastStatValues[i].delta;
-          if ((monotone == YES) && (lvalue != NULL) && (*lvalue > *value))
-            return SYSERR;      /* gnunetd restart? */
-          return OK;
+          if ((monotone == GNUNET_YES) && (lvalue != NULL) && (*lvalue > 
*value))
+            return GNUNET_SYSERR;      /* gnunetd restart? */
+          return GNUNET_OK;
         }
     }
 #if FUNCTIONS_DEBUG
@@ -78,7 +78,7 @@
           GE_DEBUG | GE_DEVELOPER | GE_REQUEST,
           "Statistic not found: `%s'\n", optName);
 #endif
-  return SYSERR;
+  return GNUNET_SYSERR;
 }
 
 static void
@@ -88,13 +88,13 @@
   char *availableDown;
   char *availableUp;
 
-  MUTEX_LOCK (lock);
-  cmh = getConfigurationOptionValue (sock, "gnunetd", "connection-max-hosts");
-  availableDown = getConfigurationOptionValue (sock,
+  GNUNET_mutex_lock (lock);
+  cmh = GNUNET_get_daemon_configuration_value (sock, "gnunetd", 
"connection-max-hosts");
+  availableDown = GNUNET_get_daemon_configuration_value (sock,
                                                "LOAD", "MAXNETDOWNBPSTOTAL");
-  availableUp = getConfigurationOptionValue (sock,
+  availableUp = GNUNET_get_daemon_configuration_value (sock,
                                              "LOAD", "MAXNETUPBPSTOTAL");
-  MUTEX_UNLOCK (lock);
+  GNUNET_mutex_unlock (lock);
   if (cmh == NULL)
     connectionGoal = 0;
   else
@@ -108,9 +108,9 @@
   else
     bandup = atol (availableUp);
 
-  FREENONNULL (cmh);
-  FREENONNULL (availableDown);
-  FREENONNULL (availableUp);
+  GNUNET_free_non_null (cmh);
+  GNUNET_free_non_null (availableDown);
+  GNUNET_free_non_null (availableUp);
 }
 
 static int
@@ -119,11 +119,11 @@
   long long val;
 
   if (connectionGoal == 0)
-    return SYSERR;
-  if (OK != getStatValue (&val, NULL, NULL, "# of connected peers", NO))
-    return SYSERR;
+    return GNUNET_SYSERR;
+  if (GNUNET_OK != getStatValue (&val, NULL, NULL, "# of connected peers", 
GNUNET_NO))
+    return GNUNET_SYSERR;
   data[0][0] = ((gfloat) val) / connectionGoal;
-  return OK;
+  return GNUNET_OK;
 }
 
 static int
@@ -134,21 +134,21 @@
   long long valu;
   long long vald;
 
-  if (OK != getStatValue (&valc, NULL, NULL, "% of allowed cpu load", NO))
-    return SYSERR;
-  if (OK != getStatValue (&vali, NULL, NULL, "% of allowed io load", NO))
-    return SYSERR;
-  if (OK != getStatValue (&valu,
-                          NULL, NULL, "% of allowed network load (up)", NO))
-    return SYSERR;
-  if (OK != getStatValue (&vald,
-                          NULL, NULL, "% of allowed network load (down)", NO))
-    return SYSERR;
+  if (GNUNET_OK != getStatValue (&valc, NULL, NULL, "% of allowed cpu load", 
GNUNET_NO))
+    return GNUNET_SYSERR;
+  if (GNUNET_OK != getStatValue (&vali, NULL, NULL, "% of allowed io load", 
GNUNET_NO))
+    return GNUNET_SYSERR;
+  if (GNUNET_OK != getStatValue (&valu,
+                          NULL, NULL, "% of allowed network load (up)", 
GNUNET_NO))
+    return GNUNET_SYSERR;
+  if (GNUNET_OK != getStatValue (&vald,
+                          NULL, NULL, "% of allowed network load (down)", 
GNUNET_NO))
+    return GNUNET_SYSERR;
   data[0][0] = (gfloat) valc / 100.0;
   data[0][1] = (gfloat) vali / 100.0;
   data[0][2] = (gfloat) valu / 100.0;
   data[0][3] = (gfloat) vald / 100.0;
-  return OK;
+  return GNUNET_OK;
 }
 
 static int
@@ -157,15 +157,15 @@
   long long allowed;
   long long have;
 
-  if (OK != getStatValue (&allowed,
-                          NULL, NULL, "# bytes allowed in datastore", NO))
-    return SYSERR;
+  if (GNUNET_OK != getStatValue (&allowed,
+                          NULL, NULL, "# bytes allowed in datastore", 
GNUNET_NO))
+    return GNUNET_SYSERR;
   if (allowed == 0)
-    return SYSERR;
-  if (OK != getStatValue (&have, NULL, NULL, "# bytes in datastore", NO))
-    return SYSERR;
+    return GNUNET_SYSERR;
+  if (GNUNET_OK != getStatValue (&have, NULL, NULL, "# bytes in datastore", 
GNUNET_NO))
+    return GNUNET_SYSERR;
   data[0][0] = ((gfloat) have) / allowed;
-  return OK;
+  return GNUNET_OK;
 }
 
 static int
@@ -183,43 +183,43 @@
   long long lqueries;
   long long lhellos;
   long long lrlimit;
-  cron_t dtime;
+  GNUNET_CronTime dtime;
   char *buffer;
 
-  if (OK != getStatValue (&total, &ltotal, &dtime, "# bytes received", YES))
-    return SYSERR;
-  if (OK != getStatValue (&noise,
-                          &lnoise, NULL, "# bytes of noise received", YES))
-    return SYSERR;
-  buffer = MALLOC (512);
-  SNPRINTF (buffer, 512, "# bytes received of type %d", P2P_PROTO_gap_RESULT);
-  if (OK != getStatValue (&content, &lcontent, NULL, buffer, YES))
+  if (GNUNET_OK != getStatValue (&total, &ltotal, &dtime, "# bytes received", 
GNUNET_YES))
+    return GNUNET_SYSERR;
+  if (GNUNET_OK != getStatValue (&noise,
+                          &lnoise, NULL, "# bytes of noise received", 
GNUNET_YES))
+    return GNUNET_SYSERR;
+  buffer = GNUNET_malloc (512);
+  GNUNET_snprintf (buffer, 512, "# bytes received of type %d", 
P2P_PROTO_gap_RESULT);
+  if (GNUNET_OK != getStatValue (&content, &lcontent, NULL, buffer, 
GNUNET_YES))
     {
       content = 0;
       lcontent = 0;
     }
-  SNPRINTF (buffer, 512, "# bytes received of type %d", p2p_PROTO_hello);
-  if (OK != getStatValue (&hellos, &lhellos, NULL, buffer, YES))
+  GNUNET_snprintf (buffer, 512, "# bytes received of type %d", 
p2p_PROTO_hello);
+  if (GNUNET_OK != getStatValue (&hellos, &lhellos, NULL, buffer, GNUNET_YES))
     {
       hellos = 0;
       lhellos = 0;
     }
-  SNPRINTF (buffer, 512, "# bytes received of type %d", P2P_PROTO_gap_QUERY);
-  if (OK != getStatValue (&queries, &lqueries, NULL, buffer, YES))
+  GNUNET_snprintf (buffer, 512, "# bytes received of type %d", 
P2P_PROTO_gap_QUERY);
+  if (GNUNET_OK != getStatValue (&queries, &lqueries, NULL, buffer, 
GNUNET_YES))
     {
       queries = 0;
       lqueries = 0;
     }
-  if (OK != getStatValue (&rlimit,
+  if (GNUNET_OK != getStatValue (&rlimit,
                           &lrlimit,
-                          NULL, "# total bytes per second receive limit", NO))
+                          NULL, "# total bytes per second receive limit", 
GNUNET_NO))
     {
       rlimit = 0;
       lrlimit = 0;
     }
-  FREE (buffer);
+  GNUNET_free (buffer);
   if (banddown == 0)
-    return SYSERR;
+    return GNUNET_SYSERR;
 
   total -= ltotal;
   noise -= lnoise;
@@ -234,18 +234,18 @@
       data[0][3] = 0.0;
       data[0][4] = 0.0;
       data[0][5] = 0.0;
-      return OK;
+      return GNUNET_OK;
     }
-  data[0][0] = ((gfloat) noise) / (banddown * dtime / cronSECONDS);     /* red 
*/
-  data[0][1] = ((gfloat) (content + noise)) / (banddown * dtime / 
cronSECONDS); /* green */
-  data[0][2] = ((gfloat) (queries + content + noise)) / (banddown * dtime / 
cronSECONDS);       /* yellow */
-  data[0][3] = ((gfloat) (queries + content + noise + hellos)) / (banddown * 
dtime / cronSECONDS);      /* blue */
-  data[0][4] = ((gfloat) total) / (banddown * dtime / cronSECONDS);     /* 
gray */
+  data[0][0] = ((gfloat) noise) / (banddown * dtime / GNUNET_CRON_SECONDS);    
 /* red */
+  data[0][1] = ((gfloat) (content + noise)) / (banddown * dtime / 
GNUNET_CRON_SECONDS); /* green */
+  data[0][2] = ((gfloat) (queries + content + noise)) / (banddown * dtime / 
GNUNET_CRON_SECONDS);       /* yellow */
+  data[0][3] = ((gfloat) (queries + content + noise + hellos)) / (banddown * 
dtime / GNUNET_CRON_SECONDS);      /* blue */
+  data[0][4] = ((gfloat) total) / (banddown * dtime / GNUNET_CRON_SECONDS);    
 /* gray */
   data[0][5] = (gfloat) rlimit / banddown;      /* magenta */
 #if 0
   printf ("I: %f %f %f %f\n", data[0][0], data[0][1], data[0][2]);
 #endif
-  return OK;
+  return GNUNET_OK;
 }
 
 static int
@@ -263,45 +263,45 @@
   long long lqueries;
   long long lhellos;
   long long lslimit;
-  cron_t dtime;
+  GNUNET_CronTime dtime;
   char *buffer;
 
-  if (OK != getStatValue (&total,
-                          &ltotal, &dtime, "# bytes transmitted", YES))
-    return SYSERR;
-  if (OK != getStatValue (&noise, &lnoise, NULL, "# bytes noise sent", YES))
-    return SYSERR;
-  buffer = MALLOC (512);
-  SNPRINTF (buffer,
+  if (GNUNET_OK != getStatValue (&total,
+                          &ltotal, &dtime, "# bytes transmitted", GNUNET_YES))
+    return GNUNET_SYSERR;
+  if (GNUNET_OK != getStatValue (&noise, &lnoise, NULL, "# bytes noise sent", 
GNUNET_YES))
+    return GNUNET_SYSERR;
+  buffer = GNUNET_malloc (512);
+  GNUNET_snprintf (buffer,
             512, "# bytes transmitted of type %d", P2P_PROTO_gap_RESULT);
-  if (OK != getStatValue (&content, &lcontent, NULL, buffer, YES))
+  if (GNUNET_OK != getStatValue (&content, &lcontent, NULL, buffer, 
GNUNET_YES))
     {
       content = 0;
       lcontent = 0;
     }
-  SNPRINTF (buffer,
+  GNUNET_snprintf (buffer,
             512, "# bytes transmitted of type %d", P2P_PROTO_gap_QUERY);
-  if (OK != getStatValue (&queries, &lqueries, NULL, buffer, YES))
+  if (GNUNET_OK != getStatValue (&queries, &lqueries, NULL, buffer, 
GNUNET_YES))
     {
       queries = 0;
       lqueries = 0;
     }
-  SNPRINTF (buffer, 512, "# bytes transmitted of type %d", p2p_PROTO_hello);
-  if (OK != getStatValue (&hellos, &lhellos, NULL, buffer, YES))
+  GNUNET_snprintf (buffer, 512, "# bytes transmitted of type %d", 
p2p_PROTO_hello);
+  if (GNUNET_OK != getStatValue (&hellos, &lhellos, NULL, buffer, GNUNET_YES))
     {
       queries = 0;
       lqueries = 0;
     }
-  if (OK != getStatValue (&slimit,
+  if (GNUNET_OK != getStatValue (&slimit,
                           &lslimit,
-                          NULL, "# total bytes per second send limit", NO))
+                          NULL, "# total bytes per second send limit", 
GNUNET_NO))
     {
       slimit = 0;
       lslimit = 0;
     }
-  FREE (buffer);
+  GNUNET_free (buffer);
   if (bandup == 0)
-    return SYSERR;
+    return GNUNET_SYSERR;
   total -= ltotal;
   noise -= lnoise;
   queries -= lqueries;
@@ -315,25 +315,25 @@
       data[0][3] = 0.0;
       data[0][4] = 0.0;
       data[0][5] = 0.0;
-      return OK;
+      return GNUNET_OK;
     }
-  data[0][0] = ((gfloat) noise) / (bandup * dtime / cronSECONDS);       /* red 
*/
-  data[0][1] = ((gfloat) (noise + content)) / (bandup * dtime / cronSECONDS);  
 /* green */
-  data[0][2] = ((gfloat) (noise + content + queries)) / (bandup * dtime / 
cronSECONDS); /* yellow */
-  data[0][3] = ((gfloat) (noise + content + queries + hellos)) / (bandup * 
dtime / cronSECONDS);        /* blue */
-  data[0][4] = ((gfloat) total) / (bandup * dtime / cronSECONDS);       /* 
grey */
+  data[0][0] = ((gfloat) noise) / (bandup * dtime / GNUNET_CRON_SECONDS);      
 /* red */
+  data[0][1] = ((gfloat) (noise + content)) / (bandup * dtime / 
GNUNET_CRON_SECONDS);   /* green */
+  data[0][2] = ((gfloat) (noise + content + queries)) / (bandup * dtime / 
GNUNET_CRON_SECONDS); /* yellow */
+  data[0][3] = ((gfloat) (noise + content + queries + hellos)) / (bandup * 
dtime / GNUNET_CRON_SECONDS);        /* blue */
+  data[0][4] = ((gfloat) total) / (bandup * dtime / GNUNET_CRON_SECONDS);      
 /* grey */
   data[0][5] = ((gfloat) slimit) / bandup;      /* magenta */
 #if 0
   printf ("O: %f %f %f %f\n", data[0][0], data[0][1], data[0][2], data[0][3]);
 #endif
-  return OK;
+  return GNUNET_OK;
 }
 
 
 static int
 getEffectivenessStats (const void *closure, gfloat ** data)
 {
-  static cron_t last;
+  static GNUNET_CronTime last;
   static double lastdata;
   static double lastavg;
   long long total;
@@ -342,31 +342,31 @@
   long long ltotal;
   long long lsuccess;
   long long llocal;
-  cron_t now;
+  GNUNET_CronTime now;
 
-  now = get_time ();
-  if (now < last + 2 * cronMINUTES)
+  now = GNUNET_get_time ();
+  if (now < last + 2 * GNUNET_CRON_MINUTES)
     {
       data[0][0] = lastdata;
       data[0][1] = lastavg;
-      return OK;
+      return GNUNET_OK;
     }
   last = now;
-  if (OK != getStatValue (&total,
+  if (GNUNET_OK != getStatValue (&total,
                           &ltotal,
                           NULL,
                           "# gap requests forwarded (counting each peer)",
-                          YES))
-    return SYSERR;
-  if (OK != getStatValue (&success,
+                          GNUNET_YES))
+    return GNUNET_SYSERR;
+  if (GNUNET_OK != getStatValue (&success,
                           &lsuccess,
-                          NULL, "# gap routing successes (total)", YES))
-    return SYSERR;
-  if (OK != getStatValue (&local,
+                          NULL, "# gap routing successes (total)", GNUNET_YES))
+    return GNUNET_SYSERR;
+  if (GNUNET_OK != getStatValue (&local,
                           &llocal,
                           NULL,
-                          "# gap requests processed: local result", YES))
-    return SYSERR;
+                          "# gap requests processed: local result", 
GNUNET_YES))
+    return GNUNET_SYSERR;
   total -= ltotal;
   data[0][0] = 0.0;
   if (ltotal + total > 0)
@@ -377,18 +377,18 @@
   else
     {
       data[0][1] = 0.0;
-      return OK;
+      return GNUNET_OK;
     }
   if (total == 0)
-    return OK;
+    return GNUNET_OK;
   success -= lsuccess;
   local -= llocal;
   if (success <= local)
-    return OK;
+    return GNUNET_OK;
   success -= local;
   lsuccess -= llocal;
   data[0][0] = lastdata = 1.0 * success / total;
-  return OK;
+  return GNUNET_OK;
 }
 
 static int
@@ -401,7 +401,7 @@
    * this will predict correctly).
    */
   static unsigned int last;
-  cron_t *delta = data;
+  GNUNET_CronTime *delta = data;
   int j;
   int found;
 
@@ -425,14 +425,14 @@
   if (found == -1)
     {
       found = lsv_size;
-      GROW (lastStatValues, lsv_size, lsv_size + 1);
-      lastStatValues[found].statName = STRDUP (optName);
+      GNUNET_array_grow (lastStatValues, lsv_size, lsv_size + 1);
+      lastStatValues[found].statName = GNUNET_strdup (optName);
     }
   lastStatValues[found].lvalue = lastStatValues[found].value;
   lastStatValues[found].value = value;
   lastStatValues[found].delta = *delta;
   last = found + 1;
-  return OK;
+  return GNUNET_OK;
 }
 
 /**
@@ -441,16 +441,16 @@
 static void
 updateStatValues (void *unused)
 {
-  static cron_t lastUpdate;
-  cron_t now;
-  cron_t delta;
+  static GNUNET_CronTime lastUpdate;
+  GNUNET_CronTime now;
+  GNUNET_CronTime delta;
 
-  now = get_time ();
+  now = GNUNET_get_time ();
   delta = now - lastUpdate;
-  MUTEX_LOCK (lock);
-  if (OK == STATS_getStatistics (ectx, sock, &statsProcessor, &delta))
+  GNUNET_mutex_lock (lock);
+  if (GNUNET_OK == STATS_getStatistics (ectx, sock, &statsProcessor, &delta))
     lastUpdate = now;
-  MUTEX_UNLOCK (lock);
+  GNUNET_mutex_unlock (lock);
 }
 
 
@@ -461,7 +461,7 @@
    &getConnectedNodesStat,
    NULL,
    1,
-   NO,
+   GNUNET_NO,
    }
   ,
   {
@@ -471,7 +471,7 @@
    &getLoadStat,
    NULL,
    4,
-   NO,
+   GNUNET_NO,
    }
   ,
   {
@@ -480,7 +480,7 @@
    &getQuotaStat,
    NULL,
    1,
-   NO,
+   GNUNET_NO,
    }
   ,
   {
@@ -510,7 +510,7 @@
    &getEffectivenessStats,
    NULL,
    2,
-   NO,
+   GNUNET_NO,
    }
   ,
   {
@@ -519,7 +519,7 @@
    NULL,
    NULL,
    0,
-   NO,
+   GNUNET_NO,
    }
   ,
 };
@@ -535,16 +535,16 @@
                                      "GNUNET-GTK",
                                      "STATS-INTERVAL",
                                      1,
-                                     99 * cronYEARS,
-                                     30 * cronSECONDS, &UPDATE_INTERVAL);
-  sock = client_connection_create (ectx, cfg);
-  lock = MUTEX_CREATE (NO);
+                                     99 * GNUNET_CRON_YEARS,
+                                     30 * GNUNET_CRON_SECONDS, 
&UPDATE_INTERVAL);
+  sock = GNUNET_client_connection_create (ectx, cfg);
+  lock = GNUNET_mutex_create (GNUNET_NO);
   cron = gnunet_gtk_get_cron ();
-  cron_add_job (cron,
+  GNUNET_cron_add_job (cron,
                 &updateStatValues, UPDATE_INTERVAL, UPDATE_INTERVAL, NULL);
-  cron_add_job (cron,
+  GNUNET_cron_add_job (cron,
                 &updateConnectionGoal,
-                5 * cronMINUTES, 5 * cronMINUTES, NULL);
+                5 * GNUNET_CRON_MINUTES, 5 * GNUNET_CRON_MINUTES, NULL);
 }
 
 void
@@ -552,13 +552,13 @@
 {
   int i;
 
-  cron_del_job (cron, &updateConnectionGoal, 5 * cronMINUTES, NULL);
-  cron_del_job (cron, &updateStatValues, UPDATE_INTERVAL, NULL);
-  MUTEX_DESTROY (lock);
-  connection_destroy (sock);
+  GNUNET_cron_del_job (cron, &updateConnectionGoal, 5 * GNUNET_CRON_MINUTES, 
NULL);
+  GNUNET_cron_del_job (cron, &updateStatValues, UPDATE_INTERVAL, NULL);
+  GNUNET_mutex_destroy (lock);
+  GNUNET_client_connection_destroy (sock);
   for (i = 0; i < lsv_size; i++)
-    FREE (lastStatValues[i].statName);
-  GROW (lastStatValues, lsv_size, 0);
+    GNUNET_free (lastStatValues[i].statName);
+  GNUNET_array_grow (lastStatValues, lsv_size, 0);
   sock = NULL;
 }
 

Modified: gnunet-gtk/src/plugins/stats/functions.h
===================================================================
--- gnunet-gtk/src/plugins/stats/functions.h    2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/stats/functions.h    2007-11-23 11:57:34 UTC (rev 
5743)
@@ -29,7 +29,7 @@
   char *statName;
   long long value;
   long long lvalue;
-  cron_t delta;
+  GNUNET_CronTime delta;
 } StatPair;
 
 /**

Modified: gnunet-gtk/src/plugins/stats/statistics.c
===================================================================
--- gnunet-gtk/src/plugins/stats/statistics.c   2007-11-23 11:51:54 UTC (rev 
5742)
+++ gnunet-gtk/src/plugins/stats/statistics.c   2007-11-23 11:57:34 UTC (rev 
5743)
@@ -250,11 +250,11 @@
     return;
   for (i = 0; i < g->num_points; i++)
     {
-      FREE (g->data[i]);
-      FREE (g->odata[i]);
+      GNUNET_free (g->data[i]);
+      GNUNET_free (g->odata[i]);
     }
-  FREE (g->data);
-  FREE (g->odata);
+  GNUNET_free (g->data);
+  GNUNET_free (g->odata);
   g->data = g->odata = NULL;
   if (g->pixmap)
     {
@@ -273,13 +273,13 @@
   if (g->allocated)
     return;
 
-  g->data = MALLOC (sizeof (gfloat *) * g->num_points);
-  g->odata = MALLOC (sizeof (gfloat *) * g->num_points);
+  g->data = GNUNET_malloc (sizeof (gfloat *) * g->num_points);
+  g->odata = GNUNET_malloc (sizeof (gfloat *) * g->num_points);
   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);
+      g->data[i] = GNUNET_malloc (g->data_size * g->count);
+      g->odata[i] = GNUNET_malloc (g->data_size * g->count);
     }
   for (i = 0; i < g->num_points; i++)
     for (j = 0; j < g->count; j++)
@@ -355,8 +355,8 @@
   if (g->timer_index != -1)
     gtk_timeout_remove (g->timer_index);
   load_graph_unalloc (g);
-  FREE (g->colors);
-  FREE (g);
+  GNUNET_free (g->colors);
+  GNUNET_free (g);
 }
 
 static LoadGraph *
@@ -371,12 +371,12 @@
       return NULL;
     }
 
-  g = MALLOC (sizeof (LoadGraph));
+  g = GNUNET_malloc (sizeof (LoadGraph));
   g->statIdx = statIdx;
   g->count = stats[statIdx].count;
-  g->speed = UPDATE_INTERVAL / cronMILLIS;
+  g->speed = UPDATE_INTERVAL / GNUNET_CRON_MILLISECONDS;
   g->num_points = 600;
-  g->colors = MALLOC (sizeof (GdkColor) * (2 + g->count));
+  g->colors = GNUNET_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++)
@@ -442,8 +442,8 @@
                                      "GNUNET-GTK",
                                      "STATS-INTERVAL",
                                      1,
-                                     99 * cronYEARS,
-                                     30 * cronSECONDS, &UPDATE_INTERVAL);
+                                     99 * GNUNET_CRON_YEARS,
+                                     30 * GNUNET_CRON_SECONDS, 
&UPDATE_INTERVAL);
   init_functions (ectx, cfg);
   notebook = glade_xml_get_widget (getMainXML (), "statsNotebook");
   memset (&config, 0, sizeof (ProcConfig));





reply via email to

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