From bc416ff5905cd5b0707097971bb9a09f5961a8ae Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sat, 10 Apr 2021 10:42:38 -0400 Subject: [PATCH] misc: Only include rbpaths.h and string-extra.h in places that need it (Don't include rbpaths.h in settings.h, or string-extra.h in rbpaths.h) Build-tested on rocker, erosq, mini2g, nano2g, xduoox3, clipzip, dx50, and uisim Change-Id: If32e9c9910f5c8247a655cb64522b84d6d7ccbb5 --- apps/gui/icon.c | 1 + apps/gui/skin_engine/skin_engine.c | 1 + apps/menus/eq_menu.c | 1 + apps/menus/playlist_menu.c | 1 + apps/menus/recording_menu.c | 1 + apps/menus/settings_menu.c | 1 + apps/menus/theme_menu.c | 1 + apps/playlist_catalog.c | 1 + apps/radio/presets.c | 2 +- apps/radio/radioart.c | 2 +- apps/scrobbler.c | 4 ++-- apps/settings.h | 1 - apps/settings_list.c | 1 + apps/shortcuts.c | 1 + firmware/drivers/audio/erosqlinux_codec.c | 3 --- firmware/export/rbpaths.h | 2 -- firmware/font.c | 1 + 17 files changed, 15 insertions(+), 10 deletions(-) diff --git a/apps/gui/icon.c b/apps/gui/icon.c index 5190c54ea5..25c0b372fa 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c @@ -28,6 +28,7 @@ #include "screen_access.h" #include "icons.h" #include "settings.h" +#include "rbpaths.h" #include "bmp.h" #include "filetypes.h" #include "language.h" diff --git a/apps/gui/skin_engine/skin_engine.c b/apps/gui/skin_engine/skin_engine.c index 1515e6f025..ce3401f41c 100644 --- a/apps/gui/skin_engine/skin_engine.c +++ b/apps/gui/skin_engine/skin_engine.c @@ -27,6 +27,7 @@ #include "action.h" #include "crc32.h" #include "settings.h" +#include "rbpaths.h" #include "wps.h" #include "file.h" #include "misc.h" diff --git a/apps/menus/eq_menu.c b/apps/menus/eq_menu.c index 683025629b..49d35c133b 100644 --- a/apps/menus/eq_menu.c +++ b/apps/menus/eq_menu.c @@ -31,6 +31,7 @@ #include "menu.h" #include "action.h" #include "settings.h" +#include "rbpaths.h" #include "screens.h" #include "icons.h" #include "font.h" diff --git a/apps/menus/playlist_menu.c b/apps/menus/playlist_menu.c index dfb9d73d62..3122a4090f 100644 --- a/apps/menus/playlist_menu.c +++ b/apps/menus/playlist_menu.c @@ -26,6 +26,7 @@ #include "lang.h" #include "action.h" #include "settings.h" +#include "string-extra.h" #include "menu.h" #include "playlist_menu.h" diff --git a/apps/menus/recording_menu.c b/apps/menus/recording_menu.c index c3187afbef..a870a5ee9b 100644 --- a/apps/menus/recording_menu.c +++ b/apps/menus/recording_menu.c @@ -30,6 +30,7 @@ #include "menu.h" #include "button.h" #include "settings.h" +#include "rbpaths.h" #include "screens.h" #include "icons.h" #include "font.h" diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 0b7516f749..4202298fa3 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c @@ -27,6 +27,7 @@ #include "lang.h" #include "action.h" #include "settings.h" +#include "rbpaths.h" #include "menu.h" #include "open_plugin.h" #include "keyboard.h" diff --git a/apps/menus/theme_menu.c b/apps/menus/theme_menu.c index 4a81c5cadf..2a50ed44b5 100644 --- a/apps/menus/theme_menu.c +++ b/apps/menus/theme_menu.c @@ -27,6 +27,7 @@ #include "lang.h" #include "action.h" #include "settings.h" +#include "rbpaths.h" #include "menu.h" #include "tree.h" #include "list.h" diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index 9d31ac333c..d100023b1b 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c @@ -36,6 +36,7 @@ #include "onplay.h" #include "playlist.h" #include "settings.h" +#include "rbpaths.h" #include "splash.h" #include "tree.h" #include "yesno.h" diff --git a/apps/radio/presets.c b/apps/radio/presets.c index 6db6e4686b..f7531d8754 100644 --- a/apps/radio/presets.c +++ b/apps/radio/presets.c @@ -23,7 +23,7 @@ #include #include #include -#include "settings.h" +#include "rbpaths.h" #include "general.h" #include "radio.h" #include "tuner.h" diff --git a/apps/radio/radioart.c b/apps/radio/radioart.c index 1fd82dae68..34efdea0da 100644 --- a/apps/radio/radioart.c +++ b/apps/radio/radioart.c @@ -24,7 +24,7 @@ #include #include #include "system.h" -#include "settings.h" +#include "rbpaths.h" #include "radio.h" #include "buffering.h" #include "playback.h" /* bufopen_user_data */ diff --git a/apps/scrobbler.c b/apps/scrobbler.c index 657ce2e7ab..f5ccf4a61c 100644 --- a/apps/scrobbler.c +++ b/apps/scrobbler.c @@ -31,11 +31,11 @@ http://www.audioscrobbler.net/wiki/Portable_Player_Logging #include "kernel.h" #include "audio.h" #include "core_alloc.h" -#include "settings.h" +#include "rbpaths.h" #include "ata_idle_notify.h" #include "pathfuncs.h" #include "appevents.h" - +#include "string-extra.h" #if CONFIG_RTC #include "time.h" #include "timefuncs.h" diff --git a/apps/settings.h b/apps/settings.h index e8241c5f9a..5d6d4cb717 100644 --- a/apps/settings.h +++ b/apps/settings.h @@ -32,7 +32,6 @@ #include "button.h" #include "audio.h" #include "dsp_proc_settings.h" -#include "rbpaths.h" struct opt_items { unsigned const char* string; diff --git a/apps/settings_list.c b/apps/settings_list.c index 1b06bfe11c..4a0bf96864 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c @@ -32,6 +32,7 @@ #include "backlight.h" #include "sound.h" #include "settings.h" +#include "rbpaths.h" #include "settings_list.h" #include "usb.h" #include "audio.h" diff --git a/apps/shortcuts.c b/apps/shortcuts.c index 78d8fc6cb5..9955b7f19d 100644 --- a/apps/shortcuts.c +++ b/apps/shortcuts.c @@ -33,6 +33,7 @@ #include "list.h" #include "settings.h" #include "settings_list.h" +#include "string-extra.h" #include "lang.h" #include "menu.h" #include "misc.h" diff --git a/firmware/drivers/audio/erosqlinux_codec.c b/firmware/drivers/audio/erosqlinux_codec.c index 58104a61e6..abb4fea01f 100644 --- a/firmware/drivers/audio/erosqlinux_codec.c +++ b/firmware/drivers/audio/erosqlinux_codec.c @@ -20,9 +20,6 @@ * KIND, either express or implied. * ****************************************************************************/ -#define RB_FILESYSTEM_OS // VERY important this is before settings.h - // because that pulls in rbpaths.h which breaks open() - //#define LOGF_ENABLE #include "config.h" diff --git a/firmware/export/rbpaths.h b/firmware/export/rbpaths.h index f53d0eb480..a3042d80bc 100644 --- a/firmware/export/rbpaths.h +++ b/firmware/export/rbpaths.h @@ -24,8 +24,6 @@ #include #include "autoconf.h" -#include "string-extra.h" - /* name of directory where configuration, fonts and other data * files are stored */ diff --git a/firmware/font.c b/firmware/font.c index 595410fed2..b8fa1c537f 100644 --- a/firmware/font.c +++ b/firmware/font.c @@ -34,6 +34,7 @@ #include "system.h" #include "kernel.h" #include "lcd.h" +#include "string-extra.h" #include "font.h" #include "file.h" #include "core_alloc.h"