Index: trunk/src/sh_getopt.c
===================================================================
--- trunk/src/sh_getopt.c	(revision 170)
+++ trunk/src/sh_getopt.c	(revision 171)
@@ -315,27 +315,36 @@
 static void sh_getopt_print_log_facilities (void)
 {
-  fputs (_("Compiled-in log facilities:"), stdout);
+  int num = 0;
+
+  fputs (_("Compiled-in log facilities:\n"), stdout);
 
 #ifndef DEFAULT_CONSOLE
-  printf (_(" console (/dev/console)"));
+  if (num > 0) fputc ('\n', stdout);
+  printf (_(" console (/dev/console)")); ++num;
 #else
+  if (num > 0) fputc ('\n', stdout);
   if (0 == strcmp (DEFAULT_CONSOLE, _("NULL")))
-    printf (_(" console (/dev/console)"));
+    { printf (_("console (/dev/console)"));  ++num; }
   else
-    printf (_(" console (%s)"), DEFAULT_CONSOLE);
-#endif
-  fputs  (_(", syslog"), stdout);
-  printf (_(", logfile (%s)"), DEFAULT_ERRFILE);
+    { printf (_("console (%s)"), DEFAULT_CONSOLE);  ++num; }
+#endif
+  if (num > 0) fputc ('\n', stdout);
+  fputs  (_(" syslog"), stdout); ++num;
+  if (num > 0) fputc ('\n', stdout);
+  printf (_(" logfile (%s)"), DEFAULT_ERRFILE); ++num;
 
 #if defined(WITH_EXTERNAL)
-  fputs (_(", external program"), stdout);
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" external program"), stdout); ++num;
 #endif
 
 #if defined(WITH_MESSAGE_QUEUE)
-  fputs (_(", message queue"), stdout);
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" message queue"), stdout); ++num;
 #endif
  
 #if defined(WITH_DATABASE)
-  fputs (_(", database"), stdout);
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" database"), stdout); ++num;
 #ifdef WITH_ODBC
   fputs (_(" (odbc)"), stdout);
@@ -353,126 +362,19 @@
 
 #if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER)
-  fputs (_(", server"), stdout);
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" server"), stdout); ++num;
 #endif
 
 #if defined(SH_WITH_MAIL)
-  fputs (_(", email"), stdout);
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" email"), stdout); ++num;
 #endif
 
 #ifdef HAVE_LIBPRELUDE
+  if (num > 0) fputc ('\n', stdout); ++num;
 #ifdef HAVE_LIBPRELUDE_8
-  fputs (_(", prelude (0.8)"), stdout);
+  fputs (_(" prelude (0.8)"), stdout);
 #else
-  fputs (_(", prelude (0.9+)"), stdout);
-#endif
-#endif
-
-  fputc ('\n', stdout);
-  return;
-}
-
-static void sh_getopt_print_options (void)
-{
-  int num = 0;
-
-
-#if defined(SH_STANDALONE)
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_("Standalone executable"), stdout); ++num;
-#endif
-#if defined(SH_WITH_CLIENT)
-  if (num > 0) fputc ('\n', stdout);
-  printf (_("Client executable (port %d)"), SH_DEFAULT_PORT); ++num;
-#endif
-#if defined(SH_WITH_CLIENT)
-  if (num > 0) fputc ('\n', stdout);
-  printf (_("Server executable (port %d, user %s)"), 
-	  SH_DEFAULT_PORT, DEFAULT_IDENT); 
-  ++num;
-#endif
-
-  fputs (_(", compiled-in options:"), stdout);
-
-#if defined(HAVE_EGD_RANDOM)
-  if (num > 0) fputc ('\n', stdout);
-  printf (_(" use entropy gathering daemon (%s)"), EGD_SOCKET_NAME); ++num;
-#endif
-#if defined(HAVE_UNIX_RANDOM)
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_(" use unix entropy gatherer"), stdout); ++num;
-#endif
-#if defined(HAVE_URANDOM)
-  if (num > 0) fputc ('\n', stdout);
-  printf (_(" use entropy device (%s)"), NAME_OF_DEV_RANDOM); ++num;
-#endif
-
-#ifdef WITH_GPG
-  if (num > 0) fputc ('\n', stdout);
-  printf (_(" GnuPG signatures (%s)"), DEFAULT_GPG_PATH); ++num;
-#ifdef HAVE_GPG_CHECKSUM
-  if (num > 0) fputc ('\n', stdout);
-  printf (_("   -- GnuPG checksum:  %s"), GPG_HASH); ++num;
-#endif
-#ifdef USE_FINGERPRINT
-  if (num > 0) fputc ('\n', stdout);
-  printf (_("   -- Key fingerprint: %s"), SH_GPG_FP); ++num;
-#endif
-#endif
-
-#if defined(SL_DEBUG)
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_(" debug build (don't use for production)"), stdout); ++num;
-#endif
-#if defined(SCREW_IT_UP)
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_(" anti-debugger"), stdout); ++num;
-#endif
-#if defined(SH_USE_XML)
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_(" xml log format"), stdout); ++num;
-#endif
-#if defined(HAVE_NTIME)
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_(" use time server"), stdout); ++num;
-#endif
-
-#if defined(SH_WITH_CLIENT) || defined(SH_STANDALONE)
-#if defined(HAVE_LIBZ)
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_(" optionally store full text for files"), stdout); ++num;
-#endif
-#if defined(USE_XATTR)
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_(" check SELinux attributes"), stdout); ++num;
-#endif
-#if defined(USE_ACL)
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_(" check Posix ACLs"), stdout); ++num;
-#endif
-#if defined(RELOAD_DATABASE)
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_(" fetch database on reload"), stdout); ++num;
-#endif
-#endif
-
-#if defined(SH_WITH_SERVER)
-
-#if !defined(HAVE_GETPEEREID) && !defined(SO_PEERCRED) && !defined(HAVE_STRUCT_CMSGCRED) && !defined(HAVE_STRUCT_FCRED) && !(defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS))
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_(" command socket authentication: use SetSocketPassword"), stdout); 
-  ++num;
-#else
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_(" command socket authentication: use SetSocketAllowUID"), stdout); 
-  ++num;
-#endif
-
-#if defined(SH_USE_LIBWRAP)
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_(" support tcp wrapper"), stdout); ++num;
-#endif
-#if defined(INET_SYSLOG)
-  if (num > 0) fputc ('\n', stdout);
-  fputs (_(" support listening on 514/udp (syslog)"), stdout); ++num;
+  fputs (_(" prelude (0.9+)"), stdout);
 #endif
 #endif
@@ -484,4 +386,124 @@
 }
 
+static void sh_getopt_print_options (void)
+{
+  int num = 0;
+
+
+#if defined(SH_STANDALONE)
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_("Standalone executable"), stdout); ++num;
+#endif
+#if defined(SH_WITH_CLIENT)
+  if (num > 0) fputc ('\n', stdout);
+  printf (_("Client executable (port %d)"), SH_DEFAULT_PORT); ++num;
+#endif
+#if defined(SH_WITH_CLIENT)
+  if (num > 0) fputc ('\n', stdout);
+  printf (_("Server executable (port %d, user %s)"), 
+	  SH_DEFAULT_PORT, DEFAULT_IDENT); 
+  ++num;
+#endif
+
+  fputs (_(", compiled-in options:"), stdout);
+
+#if defined(USE_DL_PREFIX)
+  if (num > 0) fputc ('\n', stdout);
+  printf (_(" using system malloc")); ++num;
+#else
+  if (num > 0) fputc ('\n', stdout);
+  printf (_(" using dnmalloc")); ++num;
+#endif
+
+#if defined(HAVE_EGD_RANDOM)
+  if (num > 0) fputc ('\n', stdout);
+  printf (_(" using entropy gathering daemon (%s)"), EGD_SOCKET_NAME); ++num;
+#endif
+#if defined(HAVE_UNIX_RANDOM)
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" using unix entropy gatherer"), stdout); ++num;
+#endif
+#if defined(HAVE_URANDOM)
+  if (num > 0) fputc ('\n', stdout);
+  printf (_(" using entropy device (%s)"), NAME_OF_DEV_RANDOM); ++num;
+#endif
+
+#ifdef WITH_GPG
+  if (num > 0) fputc ('\n', stdout);
+  printf (_(" GnuPG signatures (%s)"), DEFAULT_GPG_PATH); ++num;
+#ifdef HAVE_GPG_CHECKSUM
+  if (num > 0) fputc ('\n', stdout);
+  printf (_("   -- GnuPG checksum:  %s"), GPG_HASH); ++num;
+#endif
+#ifdef USE_FINGERPRINT
+  if (num > 0) fputc ('\n', stdout);
+  printf (_("   -- Key fingerprint: %s"), SH_GPG_FP); ++num;
+#endif
+#endif
+
+#if defined(SL_DEBUG)
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" debug build (do not use for production)"), stdout); ++num;
+#endif
+#if defined(SCREW_IT_UP)
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" anti-debugger"), stdout); ++num;
+#endif
+#if defined(SH_USE_XML)
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" xml log format"), stdout); ++num;
+#endif
+#if defined(HAVE_NTIME)
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" using time server"), stdout); ++num;
+#endif
+
+#if defined(SH_WITH_CLIENT) || defined(SH_STANDALONE)
+#if defined(HAVE_LIBZ)
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" optionally store full text for files"), stdout); ++num;
+#endif
+#if defined(USE_XATTR)
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" check SELinux attributes"), stdout); ++num;
+#endif
+#if defined(USE_ACL)
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" check Posix ACLs"), stdout); ++num;
+#endif
+#if defined(RELOAD_DATABASE)
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" fetch database on reload"), stdout); ++num;
+#endif
+#endif
+
+#if defined(SH_WITH_SERVER)
+
+#if !defined(HAVE_GETPEEREID) && !defined(SO_PEERCRED) && !defined(HAVE_STRUCT_CMSGCRED) && !defined(HAVE_STRUCT_FCRED) && !(defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS))
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" command socket authentication: use SetSocketPassword"), stdout); 
+  ++num;
+#else
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" command socket authentication: use SetSocketAllowUID"), stdout); 
+  ++num;
+#endif
+
+#if defined(SH_USE_LIBWRAP)
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" support tcp wrapper"), stdout); ++num;
+#endif
+#if defined(INET_SYSLOG)
+  if (num > 0) fputc ('\n', stdout);
+  fputs (_(" support listening on 514/udp (syslog)"), stdout); ++num;
+#endif
+#endif
+
+  if (num == 0)
+    fputs (_(" none"), stdout);
+  fputc ('\n', stdout);
+  return;
+}
+
 static void sh_getopt_print_modules (void)
 {
@@ -489,5 +511,5 @@
   int num = 0;
   
-  fputs (_("Compiled-in modules:"), stdout);
+  fputs (_("Compiled-in modules:\n"), stdout);
 #ifdef SH_USE_UTMP
   if (num > 0) fputc (',', stdout);
