mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
config/options: use struct option big_number field instead of number
field where OPT_LONG is used.
This commit is contained in:
parent
cde9db3d70
commit
2454ceffb7
@ -279,11 +279,15 @@ get_opt_(
|
||||
break;
|
||||
case OPT_BOOL:
|
||||
case OPT_INT:
|
||||
case OPT_LONG:
|
||||
if (opt->value.number < opt->min
|
||||
|| opt->value.number > opt->max)
|
||||
elinks_internal("Option %s has invalid value %d!", name, opt->value.number);
|
||||
break;
|
||||
case OPT_LONG:
|
||||
if (opt->value.big_number < opt->min
|
||||
|| opt->value.big_number > opt->max)
|
||||
elinks_internal("Option %s has invalid value %ld!", name, opt->value.big_number);
|
||||
break;
|
||||
case OPT_COMMAND:
|
||||
if (!opt->value.command)
|
||||
elinks_internal("Option %s has no value!", name);
|
||||
@ -491,7 +495,7 @@ add_opt(struct option *tree, unsigned char *path, unsigned char *capt,
|
||||
option->value.number = (int) value;
|
||||
break;
|
||||
case OPT_LONG:
|
||||
option->value.number = (long) value; /* FIXME: bignumber */
|
||||
option->value.big_number = (long) value; /* FIXME: cast from void * */
|
||||
break;
|
||||
case OPT_COLOR:
|
||||
decode_color(value, strlen((unsigned char *) value),
|
||||
|
@ -556,9 +556,11 @@ l_get_option(LS)
|
||||
lua_pushboolean(S, opt->value.number);
|
||||
break;
|
||||
case OPT_INT:
|
||||
case OPT_LONG:
|
||||
lua_pushnumber(S, opt->value.number);
|
||||
break;
|
||||
case OPT_LONG:
|
||||
lua_pushnumber(S, opt->value.big_number);
|
||||
break;
|
||||
case OPT_STRING:
|
||||
lua_pushstring(S, opt->value.string);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user