diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-02-03 20:46:13 +0100 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2022-02-03 20:46:13 +0100 |
| commit | c483c4c5de8ffa732eac2a8710008a1c67a23955 (patch) | |
| tree | 87071d9d03f2d225b5b8869d4d7fdabaf84c6f74 /FL | |
| parent | 80a22e97e8f61c4fb3cfd13dd4ee81c3a46c5884 (diff) | |
Fl_Preferences (X11): Fix detection of preferences directory
- Fix compiler warning [-Wmaybe-uninitialized] for variable home
- Reformat enum 'Root' for better readability
- Add new enum values CORE_SYSTEM_L and CORE_USER_L
- Improve documentation (deprecated and new enums)
- Initialize internal static variable 'filename' which could be used
uninitialized and thus return any previous value (type == MEMORY)
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Preferences.H | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/FL/Fl_Preferences.H b/FL/Fl_Preferences.H index 82f3ef47d..612827a90 100644 --- a/FL/Fl_Preferences.H +++ b/FL/Fl_Preferences.H @@ -121,17 +121,20 @@ public: Define the scope of the preferences. */ enum Root { - UNKNOWN_ROOT_TYPE = -1, ///< Returned if storage could not be determined. - SYSTEM = 0, ///< Preferences are used system-wide, deprecated, see SYSTEM_L - USER, ///< Preferences apply only to the current user, deprecated, see USER_L - MEMORY, ///< Returned if querying memory mapped preferences - ROOT_MASK = 0xFF, ///< masks for the values above - CORE = 0x100, ///< OR'd by FLTK to read and write core library preferences and options - CORE_SYSTEM = CORE|SYSTEM, - CORE_USER = CORE|USER, - C_LOCALE = 0x1000, ///< this flag should always be set, it makes sure that floating point values wre writte correctly independently of the current locale - SYSTEM_L = SYSTEM|C_LOCALE, ///< Preferences are used system-wide, locale independent - USER_L = USER|C_LOCALE, ///< Preferences apply only to the current user, locale independent + UNKNOWN_ROOT_TYPE = -1, ///< Returned if storage could not be determined. + SYSTEM = 0, ///< Preferences are used system-wide, deprecated, see SYSTEM_L + USER, ///< Preferences apply only to the current user, deprecated, see USER_L + MEMORY, ///< Returned if querying memory mapped preferences + ROOT_MASK = 0x00FF, ///< mask for the values above + CORE = 0x0100, ///< OR'd by FLTK to read and write core library preferences and options + C_LOCALE = 0x1000, ///< this flag should always be set, it makes sure that floating point + ///< values are written correctly independently of the current locale + SYSTEM_L = SYSTEM | C_LOCALE, ///< Preferences are used system-wide, locale independent + USER_L = USER | C_LOCALE, ///< Preferences apply only to the current user, locale independent + CORE_SYSTEM_L = CORE | SYSTEM_L, ///< same as CORE | SYSTEM | C_LOCALE + CORE_USER_L = CORE | USER_L, ///< same as CORE | USER | C_LOCALE + CORE_SYSTEM = CORE | SYSTEM, ///< deprecated, same as CORE | SYSTEM + CORE_USER = CORE | USER, ///< deprecated, same as CORE | USER }; /** |
