summaryrefslogtreecommitdiffstats
path: root/apps/menus
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2007-08-19 10:22:46 +0000
committerNils Wallménius <nils@rockbox.org>2007-08-19 10:22:46 +0000
commit9b591839531b77948b19191a50f816a6806e20e5 (patch)
tree06a08ff0926403f2e507e51f3ce708d4df7b81b1 /apps/menus
parent24b85ff1e3481abaa2271b26a64131c52fd36322 (diff)
downloadrockbox-9b591839531b77948b19191a50f816a6806e20e5.tar.gz
rockbox-9b591839531b77948b19191a50f816a6806e20e5.zip
Use size_t type for the buffer_size parameter to formatter functions, static two private functions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14392 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/menus')
-rw-r--r--apps/menus/eq_menu.c8
-rw-r--r--apps/menus/eq_menu.h8
-rw-r--r--apps/menus/main_menu.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/apps/menus/eq_menu.c b/apps/menus/eq_menu.c
index d16ef6912d..8058fa10aa 100644
--- a/apps/menus/eq_menu.c
+++ b/apps/menus/eq_menu.c
@@ -56,7 +56,7 @@
* Utility functions
*/
-void eq_gain_format(char* buffer, int buffer_size, int value, const char* unit)
+void eq_gain_format(char* buffer, size_t buffer_size, int value, const char* unit)
{
int v = abs(value);
@@ -64,12 +64,12 @@ void eq_gain_format(char* buffer, int buffer_size, int value, const char* unit)
v / EQ_USER_DIVISOR, v % EQ_USER_DIVISOR, unit);
}
-void eq_q_format(char* buffer, int buffer_size, int value, const char* unit)
+void eq_q_format(char* buffer, size_t buffer_size, int value, const char* unit)
{
snprintf(buffer, buffer_size, "%d.%d %s", value / EQ_USER_DIVISOR, value % EQ_USER_DIVISOR, unit);
}
-void eq_precut_format(char* buffer, int buffer_size, int value, const char* unit)
+void eq_precut_format(char* buffer, size_t buffer_size, int value, const char* unit)
{
snprintf(buffer, buffer_size, "%s%d.%d %s", value == 0 ? " " : "-",
value / EQ_USER_DIVISOR, value % EQ_USER_DIVISOR, unit);
@@ -642,7 +642,7 @@ MAKE_MENU(equalizer_menu, ID2P(LANG_EQUALIZER), NULL, Icon_EQ,
#ifdef HAVE_WM8758
-void eq_hw_gain_format(char* buffer, int buffer_size, int value,
+void eq_hw_gain_format(char* buffer, size_t buffer_size, int value,
const char* unit)
{
snprintf(buffer, buffer_size, "%d %s", value, unit);
diff --git a/apps/menus/eq_menu.h b/apps/menus/eq_menu.h
index 8f3cb834d8..b101ff36ed 100644
--- a/apps/menus/eq_menu.h
+++ b/apps/menus/eq_menu.h
@@ -41,11 +41,11 @@ bool eq_browse_presets(void);
bool eq_menu_graphical(void);
/* utility functions for settings_list.c */
-void eq_gain_format(char* buffer, int buffer_size, int value, const char* unit);
-void eq_q_format(char* buffer, int buffer_size, int value, const char* unit);
-void eq_precut_format(char* buffer, int buffer_size, int value, const char* unit);
+void eq_gain_format(char* buffer, size_t buffer_size, int value, const char* unit);
+void eq_q_format(char* buffer, size_t buffer_size, int value, const char* unit);
+void eq_precut_format(char* buffer, size_t buffer_size, int value, const char* unit);
#ifdef HAVE_WM8758
-void eq_hw_gain_format(char* buffer, int buffer_size, int value,
+void eq_hw_gain_format(char* buffer, size_t buffer_size, int value,
const char* unit);
/* WM8758 equalizer supports -12 to +12 dB gain in 1 dB increments. */
#define EQ_HW_GAIN_STEP 1
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index f01e8dc23a..1ae5774d15 100644
--- a/apps/menus/main_menu.c
+++ b/apps/menus/main_menu.c
@@ -358,7 +358,7 @@ MENUITEM_FUNCTION(show_info_item, 0, ID2P(LANG_ROCKBOX_INFO),
/* sleep Menu */
-static void sleep_timer_formatter(char* buffer, int buffer_size, int value,
+static void sleep_timer_formatter(char* buffer, size_t buffer_size, int value,
const char* unit)
{
int minutes, hours;