summaryrefslogtreecommitdiff
path: root/ui/language.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-04-28 12:33:28 -0700
committerGuy Harris <guy@alum.mit.edu>2016-04-28 19:34:02 +0000
commit232b2de7bb008a2bc7c3e5eece04aab16215d24c (patch)
tree488390f23d6b9c2d18068889b716425466879c88 /ui/language.h
parent7150588d23d5ab844dd99507ec94831375a07b67 (diff)
downloadwireshark-232b2de7bb008a2bc7c3e5eece04aab16215d24c.tar.gz
Use "system" for "use system language", and don't try to print a null string.
Add a #define USE_SYSTEM_LANGUAGE for the language string meaning "use the system setting", and use that instead of hardcoding "system" in various places. If "language" is null, don't try to write it to the file with fprintf() - on *most* systems, that prints "(null)", but on some systems, such as Solaris, it *crashes*. Write USE_SYSTEM_LANGUAGE instead. Check for "(null)" and treat it as meaning "use the system language". Map "auto" to "use the system language" as well, for backwards compatibility. Change-Id: Iba9be540a5139e9cca8bddd0761ee4cbf0f79a49 Reviewed-on: https://code.wireshark.org/review/15147 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/language.h')
-rw-r--r--ui/language.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/language.h b/ui/language.h
index 8b94d23f69..988461befc 100644
--- a/ui/language.h
+++ b/ui/language.h
@@ -28,6 +28,8 @@
extern "C" {
#endif /* __cplusplus */
+#define USE_SYSTEM_LANGUAGE "system"
+
extern char *language;
extern void read_language_prefs(void);