summaryrefslogtreecommitdiffstats
path: root/m_option.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-13 18:33:56 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-13 18:33:56 +0000
commit169416fd51654b847e03dc9632b615c7f0a85b2a (patch)
tree8cefffb8b02dc50b41ed7927fe840658e767b549 /m_option.c
parent619b57225d4bc137ee2ab6cd2b78e198c3a4b9fa (diff)
downloadmpv-169416fd51654b847e03dc9632b615c7f0a85b2a.tar.bz2
mpv-169416fd51654b847e03dc9632b615c7f0a85b2a.tar.xz
Use PRI?64 defines as format strings for 64 bit variables.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16751 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'm_option.c')
-rw-r--r--m_option.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/m_option.c b/m_option.c
index 135f2cee71..e595d0bb84 100644
--- a/m_option.c
+++ b/m_option.c
@@ -289,7 +289,7 @@ static int parse_position(m_option_t* opt,char *name, char *param, void* dst, in
if (param == NULL)
return M_OPT_MISSING_PARAM;
if (sscanf(param, sizeof(off_t) == sizeof(int) ?
- "%d%c" : "%lld%c", &tmp_off, &dummy) != 1) {
+ "%d%c" : "%"PRId64"%c", &tmp_off, &dummy) != 1) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "The %s option must be an integer: %s\n",opt->name,param);
return M_OPT_INVALID;
}
@@ -297,20 +297,16 @@ static int parse_position(m_option_t* opt,char *name, char *param, void* dst, in
if (opt->flags & M_OPT_MIN)
if (tmp_off < opt->min) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
- (sizeof(off_t) == sizeof(int) ?
- "The %s option must be >= %d: %s\n" :
- "The %s option must be >= %lld: %s\n"),
- name, (off_t) opt->min, param);
+ "The %s option must be >= %"PRId64": %s\n",
+ name, (int64_t) opt->min, param);
return M_OPT_OUT_OF_RANGE;
}
if (opt->flags & M_OPT_MAX)
if (tmp_off > opt->max) {
mp_msg(MSGT_CFGPARSER, MSGL_ERR,
- (sizeof(off_t) == sizeof(int) ?
- "The %s option must be <= %d: %s\n" :
- "The %s option must be <= %lld: %s\n"),
- name, (off_t) opt->max, param);
+ "The %s option must be <= %"PRId64": %s\n",
+ name, (int64_t) opt->max, param);
return M_OPT_OUT_OF_RANGE;
}
@@ -320,7 +316,7 @@ static int parse_position(m_option_t* opt,char *name, char *param, void* dst, in
}
static char* print_position(m_option_t* opt, void* val) {
- return dup_printf(sizeof(off_t) == sizeof(int) ? "%d" : "%lld",VAL(val));
+ return dup_printf("%"PRId64,(int64_t)VAL(val));
}
m_option_type_t m_option_type_position = {