Index: roarclients/roarpluginrunner.c
===================================================================
--- roarclients/roarpluginrunner.c	(revision 5347)
+++ roarclients/roarpluginrunner.c	(revision 5353)
@@ -41,8 +41,13 @@
  fprintf(stderr, "\nOptions:\n\n");
 
- fprintf(stderr, " -h --help         - This help.\n"
-                 "    --verbose      - Be verbose. Can be used multiple times.\n"
-                 "    --run          - Run plugin.\n"
-                 "    --explain      - Explain plugin.\n");
+ fprintf(stderr, " -h --help            - This help.\n"
+                 "    --verbose         - Be verbose. Can be used multiple times.\n"
+                 "    --server SERVER   - Set default server to SERVER.\n"
+                 "    --run             - Run plugin.\n"
+                 "    --explain         - Explain plugin.\n"
+                 "    --appname NAME    - Sets the appname.\n"
+                 "    --abiversion ABI  - Set the ABI version.\n"
+                 "    --args ARGS       - Set plugin arguments.\n"
+        );
 }
 
@@ -66,9 +71,23 @@
 
 static const char * _ptr2str(const void * p) {
+#ifdef ROAR_HAVE_DLADDR
+ static char buf[80];
+ Dl_info info;
+#else
  static char buf[24];
+#endif
 
  if ( p == NULL )
   return "<not set>";
 
+#ifdef ROAR_HAVE_DLADDR
+ if ( dladdr(p, &info) != 0 ) {
+  if ( p == info.dli_saddr ) {
+   snprintf(buf, sizeof(buf), "%p <%s in \"%s\">", p, info.dli_sname, info.dli_fname);
+   return buf;
+  }
+ }
+#endif
+
  snprintf(buf, sizeof(buf), "%p", p);
 
@@ -77,5 +96,5 @@
 
 static const char * _ptrrange2str(const void * p, size_t len) {
- static char buf[48];
+ static char buf[80];
 
  if ( p == NULL )
@@ -112,5 +131,5 @@
  lib = func(g_para);
  if ( lib == NULL ) {
-  fprintf(stderr, "Warning: Can not RA init: %s\n", name);
+  fprintf(stderr, "Warning: Can not RA init: %s: %s\n", name, roar_error2str(roar_error));
   roar_dl_unref(lhandle);
   return 0;
@@ -122,9 +141,12 @@
 
  printf("lib                     = %s\n", _ptr2str(lib));
- printf("|-> version             = %i (%smatch)\n", lib->version, lib->version == ROAR_DL_LIBINST_VERSION ? "" : "no ");
- printf("%c-> len                 = %zu (%smatch)\n", libok ? '|' : '\\', lib->len, lib->len == sizeof(*lib) ? "" : "no ");
+ if ( g_verbose || !libok ) {
+  printf("|-> version             = %i (%smatch)\n", lib->version, lib->version == ROAR_DL_LIBINST_VERSION ? "" : "no ");
+  printf("%c-> len                 = %zu (%smatch)\n", libok ? '|' : '\\', lib->len, lib->len == sizeof(*lib) ? "" : "no ");
+ }
 
  if ( libok ) {
-  printf("|-> unload              = %s\n", _ptr2str(lib->unload));
+  if ( g_verbose || lib->unload != NULL )
+   printf("|-> unload              = %s\n", _ptr2str(lib->unload));
   printf("|-> func                = {");
   i = 0;
@@ -151,11 +173,15 @@
     libnameok = 1;
    }
-   printf("|   |-> version         = %i (%smatch)\n", lib->libname->version,
-                                                      lib->libname->version == ROAR_DL_LIBNAME_VERSION ? "" : "no ");
-   printf("|   %c-> len             = %zu (%smatch)\n", libnameok ? '|' : '\\', lib->libname->len,
-                                                      lib->libname->len == sizeof(*(lib->libname)) ? "" : "no ");
+   if ( g_verbose || !libnameok ) {
+    printf("|   |-> version         = %i (%smatch)\n", lib->libname->version,
+                                                       lib->libname->version == ROAR_DL_LIBNAME_VERSION ? "" : "no ");
+    printf("|   %c-> len             = %zu (%smatch)\n", libnameok ? '|' : '\\', lib->libname->len,
+                                                         lib->libname->len == sizeof(*(lib->libname)) ? "" : "no ");
+   }
+
    if ( libnameok ) {
 #define _ps(k,name) \
     tmp = (lib->libname->name) != NULL; \
+    if ( tmp || g_verbose || (k) == '\\' ) \
     printf("|   %c-> %-15s = %s%s%s\n", (k), #name, tmp ? "\"" : "", \
                                     tmp ? (lib->libname->name) : "<not set>", tmp ? "\"" : "");
@@ -172,7 +198,11 @@
    }
   }
-  printf("|-> global_data_len     = %zu\n", lib->global_data_len);
-  printf("|-> global_data_init    = %s\n", _ptrrange2str(lib->global_data_init, lib->global_data_len));
-  printf("|-> global_data_pointer = %s\n", _ptr2str(lib->global_data_pointer));
+  if ( g_verbose || lib->global_data_pointer != NULL )
+   printf("|-> global_data_len     = %zu\n", lib->global_data_len);
+  if ( g_verbose || lib->global_data_init != NULL )
+   printf("|-> global_data_init    = %s\n", _ptrrange2str(lib->global_data_init, lib->global_data_len));
+  if ( g_verbose || lib->global_data_pointer != NULL )
+   printf("|-> global_data_pointer = %s\n", _ptr2str(lib->global_data_pointer));
+
   if ( lib->libdep != NULL && lib->libdep_len ) {
    printf("|-> libdep              = %s\n", _ptr2str(lib->libdep));
@@ -186,14 +216,18 @@
      libdepok = 0;
     }
-    printf("|   %c   |-> version     = %i (%smatch)\n", c, lib->libdep[iter].version,
-                                                        lib->libdep[iter].version == ROAR_DL_LIBDEP_VERSION ? "" : "no ");
-    printf("|   %c   %c-> len         = %zu (%smatch)\n", c, libdepok ? '|' : '\\',
-                                                       lib->libdep[iter].len,
-                                                       lib->libdep[iter].len == sizeof(struct roar_dl_librarydep) ?
-                                                       "" : "no ");
+    if ( g_verbose || !libdepok ) {
+     printf("|   %c   |-> version     = %i (%smatch)\n", c, lib->libdep[iter].version,
+                                                         lib->libdep[iter].version == ROAR_DL_LIBDEP_VERSION ? "" : "no ");
+     printf("|   %c   %c-> len         = %zu (%smatch)\n", c, libdepok ? '|' : '\\',
+                                                        lib->libdep[iter].len,
+                                                        lib->libdep[iter].len == sizeof(struct roar_dl_librarydep) ?
+                                                        "" : "no ");
+    }
+
     if ( libdepok ) {
      printf("|   %c   |-> flags       = 0x%.8lX\n", c, (unsigned long int)lib->libdep[iter].flags);
 #define _ps(k,name) \
     tmp = (lib->libdep[iter].name) != NULL; \
+    if ( tmp || g_verbose || (k) == '\\' ) \
     printf("|   %c   %c-> %-11s = %s%s%s\n", c, (k), #name, tmp ? "\"" : "", \
                                     tmp ? (lib->libdep[iter].name) : "<not set>", tmp ? "\"" : "");
@@ -209,12 +243,26 @@
    printf("|-> libdep_len          = %zu (invalid)\n", lib->libdep_len);
   }
-  printf("\\-> appsched            = %s\n", _ptr2str(lib->appsched));
-  if ( lib->appsched != NULL ) {
-   printf("    |-> init            = %s\n", _ptr2str(lib->appsched->init));
-   printf("    |-> free            = %s\n", _ptr2str(lib->appsched->free));
-   printf("    |-> update          = %s\n", _ptr2str(lib->appsched->update));
-   printf("    |-> tick            = %s\n", _ptr2str(lib->appsched->tick));
-   printf("    \\-> wait            = %s\n", _ptr2str(lib->appsched->wait));
-  }
+  if ( g_verbose || lib->appsched != NULL ) {
+   printf("|-> appsched            = %s\n", _ptr2str(lib->appsched));
+   if ( lib->appsched != NULL ) {
+    if ( lib->appsched->init != NULL )
+     printf("|   |-> init            = %s\n", _ptr2str(lib->appsched->init));
+    if ( lib->appsched->free != NULL )
+     printf("|   |-> free            = %s\n", _ptr2str(lib->appsched->free));
+    if ( lib->appsched->update != NULL )
+     printf("|   |-> update          = %s\n", _ptr2str(lib->appsched->update));
+    if ( lib->appsched->tick != NULL )
+     printf("|   |-> tick            = %s\n", _ptr2str(lib->appsched->tick));
+    printf("|   \\-> wait            = %s\n", _ptr2str(lib->appsched->wait));
+   }
+  }
+#define _ps(k,name) \
+    tmp = (lib->name) != NULL; \
+    if ( tmp || g_verbose || (k) == '\\' ) \
+    printf("%c-> %-19s = %s%s%s\n", (k), #name, tmp ? "\"" : "", \
+                                    tmp ? (lib->name) : "<not set>", tmp ? "\"" : "");
+  _ps('|', host_appname);
+  _ps('\\', host_abiversion);
+#undef _ps
  }
 
@@ -247,6 +295,6 @@
 
 int main (int argc, char * argv[]) {
- const char * appname    = "roarpluginrunner";
- const char * abiversion = NULL;
+ const char * appname    = "roarpluginrunner " ROAR_VSTR_ROARAUDIO;
+ const char * abiversion = "1.0beta0";
  const char * pluginargs = NULL;
  enum action action = RUN;
@@ -267,4 +315,6 @@
   } else if ( !strcmp(k, "--verbose") ) {
    g_verbose++;
+  } else if ( !strcmp(k, "--server") ) {
+   roar_libroar_set_server(argv[++i]);
   } else if ( !strcmp(k, "--appname") ) {
    appname = argv[++i];
