# include "config.h"
#endif
-#ifdef HAVE_LIBPCAP
-#include <pcap.h>
-#endif /* HAVE_LIBPCAP */
-
#include <glib.h>
#include <stdlib.h>
#include <pcre.h> /* to get the libpcre version number */
#endif /* HAVE_LIBPCRE */
-/*
- * This has to come after the include of <pcap.h>, as the include of
- * <pcap.h> might cause <winsock2.h> to be included, and if we've
- * already included <winsock.h> as a result of including <windows.h>,
- * we get a bunch of redefinitions.
- */
-#ifdef HAVE_WINDOWS_H
-#include <windows.h>
-#endif
-
#ifdef HAVE_SOME_SNMP
#ifdef HAVE_NET_SNMP
#include "svnversion.h"
+#ifdef HAVE_WINDOWS_H
+#include <windows.h>
+#endif
+
+#ifdef HAVE_LUA
+#include <lua.h>
+#endif
+
#ifdef SVNVERSION
const char *svnversion = " (" SVNVERSION ")";
#else
const char *svnversion = "";
#endif
-
/*
* See whether the last line in the string goes past column 80; if so,
* replace the blank at the specified point with a newline.
}
}
+/*
+ * If the string doesn't end with a newline, append one.
+ */
+static void
+end_string(GString *str)
+{
+ size_t point;
+
+ point = strlen(str->str);
+ if (point == 0 || str->str[point - 1] != '\n')
+ g_string_append(str, "\n");
+}
+
/*
* Get various library compile-time versions and append them to
* the specified GString.
#else
g_string_append(str, "without ADNS");
#endif /* HAVE_GNU_ADNS */
+ g_string_append(str, ",");
+
+ g_string_append(str, " ");
+ break_point = str->len - 1;
+#ifdef HAVE_LUA
+ g_string_append(str, "with ");
+ g_string_append(str, LUA_VERSION);
+#else
+ g_string_append(str, "without Lua");
+#endif /* HAVE_LUA */
g_string_append(str, ".");
do_word_wrap(str, break_point);
"\nsyntax.");
do_word_wrap(str, break_point);
#endif /* HAVE_LIBPCRE */
+
+ end_string(str);
}
/*
g_string_append(str, "an unknown OS");
#endif
g_string_append(str, ".");
+
+ end_string(str);
+}
+
+/*
+ * Get copyright information.
+ */
+const char *
+get_copyright_info(void)
+{
+ return
+"Copyright 1998-2006 Gerald Combs <gerald@ethereal.com> and contributors.\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n";
}