summaryrefslogtreecommitdiffstats
path: root/options/path.c
Commit message (Collapse)AuthorAgeFilesLines
* config: fix --config-dir logic for global config fileswm42014-02-281-1/+1
| | | | | Global config files should be loaded only when --no-config is missing _and_ --config-dir is not set.
* config: always print resolved config paths in verbose modewm42014-02-251-50/+63
| | | | | Restructure the code to make that easier. There should be no functional changes, other than the log call at the end of each function.
* config: add a --config-dir option to force config directorywm42014-02-251-0/+15
| | | | Useful for slave-mode like uses, and not as radical as --no-config.
* options: make --no-config block all auto-loaded configuration fileswm42014-02-141-0/+11
| | | | | | | | | | | | Until now, the --no-config was explicitly checked in multiple places to suppress loading of config files. Add such a check to the config path code itself, and refuse to resolve _any_ configuration file locations if the option is set. osc.lua needs a small fixup, because it didn't handle the situation when no path was returned. There may some of such cases in the C code too, but I didn't find any on a quick look.
* path: add function to split URL into prefix and pathwm42013-12-221-0/+11
| | | | Used in the following commit.
* path: don't accept empty protocol as validwm42013-12-221-1/+1
| | | | mp_is_url("://") returned true.
* path: change mp_splitext() semanticswm42013-12-221-4/+4
| | | | | | | | | Including the "." in the returned extension was too inconvenient. I think originally, the semantics were supposed to work like in Python, but screw this. Also, return NULL instead of "" on failure (which is what its only user actually seems to expect).
* path lookup functions: mp_msg conversionswm42013-12-211-17/+23
| | | | | | | | | | | | | | | | | There's a single mp_msg() in path.c, but all path lookup functions seem to depend on it, so we get a rat-tail of stuff we have to change. This is probably a good thing though, because we can have the path lookup functions also access options, so we could allow overriding the default config path, or ignore the MPV_HOME environment variable, and such things. Also take the chance to consistently add talloc_ctx parameters to the path lookup functions. Also, this change causes a big mess on configfiles.c. It's the same issue: everything suddenly needs a (different) context argument. Make it less wild by providing a mp_load_auto_profiles() function, which isolates most of it to configfiles.c.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-1/+1
|
* Move options/config related files from mpvcore/ to options/wm42013-12-171-0/+238
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.