summaryrefslogtreecommitdiffstats
path: root/options/parse_configfile.c
Commit message (Collapse)AuthorAgeFilesLines
* parse_configfile: check quote termination properlywm42014-11-211-0/+7
| | | | | | This is some terrible code; I blame MPlayer legacy. Found by Coverity.
* config: adjust config parser messageswm42014-07-131-5/+4
| | | | Some cleanup. Also, try not to call mp_msg multiple times for 1 line.
* config: skip BOMwm42014-07-121-0/+4
|
* Audit and replace all ctype.h useswm42014-07-011-8/+8
| | | | | | | | | | | | | | | | Something like "char *s = ...; isdigit(s[0]);" triggers undefined behavior, because char can be signed, and thus s[0] can be a negative value. The is*() functions require unsigned char _or_ EOF. EOF is a special value outside of unsigned char range, thus the argument to the is*() functions can't be a char. This undefined behavior can actually trigger crashes if the implementation of these functions e.g. uses lookup tables, which are then indexed with out-of-range values. Replace all <ctype.h> uses with our own custom mp_is*() functions added with misc/ctype.h. As a bonus, these functions are locale-independent. (Although currently, we _require_ C locale for other reasons.)
* options: remove a global variablewm42014-06-111-5/+2
| | | | This is probably the last one, at least with my current configuration.
* options: let unknown option case be handled by final option parserwm42014-05-051-5/+4
| | | | | | | If an option is completely missing, let m_config_parse_option() handle this case, instead of erroring out early. Needed for the following commit.
* encode: don't apply default config optionswm42014-04-191-12/+8
| | | | | | | | | | | | Often, user configs set options that are not suitable for encoding. Usually, playback and encoding are pretty different things, so it makes sense to keep them strictly separate. There are several possible solutions. The approach taken by this commit is to basically ignore the default config settings, and switch to an [encoding] config profile section instead. This also makes it impossible to have --o in a config file, because --o enables encode mode. See github issue #727 for discussion.
* options: some more mp_msg conversionswm42013-12-211-22/+16
|
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-1/+1
|
* Move options/config related files from mpvcore/ to options/wm42013-12-171-0/+277
Since m_option.h and options.h are extremely often included, a lot of files have to be changed. Moving path.c/h to options/ is a bit questionable, but since this is mainly about access to config files (which are also handled in options/), it's probably ok.