diff options
author | Guy Harris <guy@alum.mit.edu> | 2005-12-21 08:59:52 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2005-12-21 08:59:52 +0000 |
commit | c9b702ba1af50d483d5cd8048bb808a2f577e6b8 (patch) | |
tree | 7902e04f919aedffa340a284a670ed1324f7526b /version_info.c | |
parent | 8aca1c1c529878989aebfe6c1d3f9c5e0c8dc531 (diff) | |
download | wireshark-c9b702ba1af50d483d5cd8048bb808a2f577e6b8.tar.gz wireshark-c9b702ba1af50d483d5cd8048bb808a2f577e6b8.tar.bz2 wireshark-c9b702ba1af50d483d5cd8048bb808a2f577e6b8.zip |
Provide not only copyright information, but a GPL blurb, in all the
version/usage messages.
Put newlines at the end of various version strings.
svn path=/trunk/; revision=16870
Diffstat (limited to 'version_info.c')
-rw-r--r-- | version_info.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/version_info.c b/version_info.c index 954b05379e..c2de660309 100644 --- a/version_info.c +++ b/version_info.c @@ -81,7 +81,6 @@ 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. @@ -103,6 +102,19 @@ do_word_wrap(GString *str, gint point) } /* + * 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. */ @@ -201,6 +213,8 @@ get_compiled_version_info(GString *str) "\nsyntax."); do_word_wrap(str, break_point); #endif /* HAVE_LIBPCRE */ + + end_string(str); } /* @@ -373,4 +387,18 @@ get_runtime_version_info(GString *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-2005 Gerald Combs <gerald@ethereal.com>.\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"; } |