diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-03-23 21:02:47 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-03-24 04:48:12 +0000 |
commit | 4ad6f2a813b3775fed4a85d6a337773019357fab (patch) | |
tree | 86e810073307b94b71128f0847a3ed22fd09a8de /wsutil | |
parent | 2cb4d315adc291554f59b74ad04227401109db43 (diff) |
Add routines to return "Please report this as a bug" message strings.
(Routines, so that if we internationalize strings not in the Qt code,
this can return the appropriately translated version.)
Change-Id: I1c169d79acde2f0545af7af2a737883d58f52509
Reviewed-on: https://code.wireshark.org/review/32549
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wsutil')
-rw-r--r-- | wsutil/CMakeLists.txt | 2 | ||||
-rw-r--r-- | wsutil/please_report_bug.c | 33 | ||||
-rw-r--r-- | wsutil/please_report_bug.h | 35 |
3 files changed, 70 insertions, 0 deletions
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index 555d99f6a8..030dc9e3ce 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -48,6 +48,7 @@ set(WSUTIL_PUBLIC_HEADERS nstime.h os_version_info.h pint.h + please_report_bug.h plugins.h pow2.h privileges.h @@ -102,6 +103,7 @@ set(WSUTIL_COMMON_FILES nstime.c cpu_info.c os_version_info.c + please_report_bug.c privileges.c rsa.c sober128.c diff --git a/wsutil/please_report_bug.c b/wsutil/please_report_bug.c new file mode 100644 index 0000000000..f05067ac87 --- /dev/null +++ b/wsutil/please_report_bug.c @@ -0,0 +1,33 @@ +/* please_report_bug.c + * Routines returning strings to use when reporting a bug. + * They ask the user to report a bug to the Wireshark developers. + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "please_report_bug.h" + +/* + * Long message, to use in alert boxes and printed messages. + */ +const char * +please_report_bug(void) +{ + return + "Please report this to the Wireshark developers.\n" + "https://bugs.wireshark.org/\n" + "(This is not a crash; please do not report it as such.)"; +} + +/* + * Short message, to use in status bar messages. + */ +const char * +please_report_bug_short(void) +{ + return "Please report this to the Wireshark developers."; +} diff --git a/wsutil/please_report_bug.h b/wsutil/please_report_bug.h new file mode 100644 index 0000000000..508bf5a1a5 --- /dev/null +++ b/wsutil/please_report_bug.h @@ -0,0 +1,35 @@ +/* please_report_bug.h + * Declarations of routines returning strings to use when reporting a bug. + * They ask the user to report a bug to the Wireshark developers. + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef __PLEASE_REPORT_BUG_H__ +#define __PLEASE_REPORT_BUG_H__ + +#include "ws_symbol_export.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* + * Long message, to use in alert boxes and printed messages. + */ +WS_DLL_PUBLIC const char *please_report_bug(void); + +/* + * Short message, to use in status bar messages. + */ +WS_DLL_PUBLIC const char *please_report_bug_short(void); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __PLEASE_REPORT_BUG_H__ */ |