1
0
Fork 0
forked from len0rd/rockbox

Rewrite set_file() to be smaller and better readable, and a comment describing what it does.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27567 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2010-07-25 22:45:57 +00:00
parent 6325ef978b
commit a3e6a865df
2 changed files with 19 additions and 16 deletions

View file

@ -55,7 +55,7 @@ struct opt_items {
#ifndef ROCKBOX_DIR
#error ROCKBOX_DIR not defined (should be in autoconf.h)
#endif
#define ROCKBOX_DIR_LEN sizeof(ROCKBOX_DIR)
#define ROCKBOX_DIR_LEN (sizeof(ROCKBOX_DIR)-1)
#endif /* def __PCTOOL__ */
@ -288,7 +288,7 @@ bool set_int_ex(const unsigned char* string, const char* unit, int voice_unit,
const char* (*formatter)(char*, size_t, int, const char*),
int32_t (*get_talk_id)(int, int));
void set_file(const char* filename, char* setting, int maxlen);
void set_file(const char* filename, char* setting, const int maxlen);
bool set_option(const char* string, const void* variable, enum optiontype type,
const struct opt_items* options, int numoptions, void (*function)(int));