summaryrefslogtreecommitdiffstats
path: root/parser-cfg.c
Commit message (Collapse)AuthorAgeFilesLines
* windows support: unicode filenameswm42012-03-091-0/+2
| | | | | | | | | | | | | | | | | | | Windows uses a legacy codepage for char* / runtime functions accepting char *. Using UTF-8 as the codepage with setlocale() is explicitly forbidden. Work this around by overriding the MSVCRT functions with wrapper macros, that assume UTF-8 and use "proper" API calls like _wopen etc. to deal with unicode filenames. All code that uses standard functions that take or return filenames must now include osdep/io.h. stat() can't be overridden, because MinGW-w64 itself defines "stat" as a macro. Change code to use use mp_stat() instead. This is not perfectly clean, but still somewhat sane, and much better than littering the rest of the mplayer code with MinGW specific hacks. It's also a bit fragile, but that's actually little different from the previous situation. Also, MinGW is unlikely to ever include a nice way of dealing with this.
* build: fix --enable-debug, remove some "#ifdef MP_DEBUG"Uoti Urpala2011-07-301-10/+0
| | | | | | | | | | | Recent commit 5d5ca22a6d ("options: commandline: accept --foo=xyz style options") left some bad code under "#ifdef MP_DEBUG" in playtree.c, which caused a compilation failure if configured with "--enable-debug". Fix this. Having the "#ifdef MP_DEBUG" there was completely unnecessary; it only increased the risk for this kind of problems for no real benefit - executing the asserts under it would have no noticeable performance or other penalty in default builds either. Remove several cases of such harmful "#ifdef MP_DEBUG".
* options: change option parsing to use bstrUoti Urpala2011-07-291-1/+1
| | | | | | Using bstr allows simpler parsing code, especially because it avoids the need to modify or copy strings just to terminate extracted substrings.
* cosmetics: parser-cfg.c: reformatUoti Urpala2011-07-291-208/+208
|
* options: indicate ambiguous option parameters explicitlyUoti Urpala2011-07-291-1/+1
| | | | | | | | Command line options like "-foo xyz" are ambiguous: "xyz" may be a parameter to the option "foo" or an unrelated argument. Instead of relying on the struct m_config mode field (commandline/file) pass parameters to specify ambiguous mode explicitly. Meant for "--foo" options which are never ambiguous on command line either.
* options: move command line preparse together with parseUoti Urpala2011-07-261-40/+0
|
* Add license header to all top-level files missing them.diego2010-01-301-0/+17
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30471 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move variable declaration into block where it is used and make it const.reimar2009-08-311-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29602 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make m_config_parse_config_file file name argument constreimar2009-08-311-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29601 b3059339-0415-0410-9bf9-f77b7e298cf2
* whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* Replace the trivial command line preparser with a more robust versionalbeu2008-04-131-0/+38
| | | | | | | allowing all kind of options to be used. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26440 b3059339-0415-0410-9bf9-f77b7e298cf2
* Include some .h files in corresponding .c filesuau2008-03-281-0/+1
| | | | | | | | | Include the corresponding .h file in command.c, parser-cfg.c and parser-mpcmd.c. This allows the compiler to check that the declarations in the .h file match the actual defition. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26295 b3059339-0415-0410-9bf9-f77b7e298cf2
* Remove some more useless *alloc castsreimar2007-07-191-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23826 b3059339-0415-0410-9bf9-f77b7e298cf2
* increased a bit max param length as it can be too short to declare tv ↵ben2007-01-041-1/+1
| | | | | | channels when you have a long list of git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21817 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix stray newline that should only be printed in verbose mode.diego2006-08-201-2/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19468 b3059339-0415-0410-9bf9-f77b7e298cf2
* Doxygen Attack! - Chapter 3albeu2006-04-251-0/+18
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18266 b3059339-0415-0410-9bf9-f77b7e298cf2
* Profiles support.albeu2006-01-241-1/+19
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17472 b3059339-0415-0410-9bf9-f77b7e298cf2
* Reduce excessive verbosity.diego2004-11-151-2/+2
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13947 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l to albeu for his english grammar, and 10l to me becouse I noticed that ↵alex2003-08-131-1/+1
| | | | | | lately (my backward compatibilty macro uses M_OPT_UNKNOWN) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10596 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removed the historic cfgparser and switched full to the new config parser ↵alex2003-08-131-5/+0
| | | | | | (altought some macros still remain for compatibility). As a side effect 90% of the warning messages are gone from the core. Things should be cleaner now and less confusing for newbies. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10595 b3059339-0415-0410-9bf9-f77b7e298cf2
* 1000l! crashing on broken config files finally fixed!rfelker2003-06-041-3/+3
| | | | | | | | | | | | | | Patch by Alex Sisson (alex_sisson at yahoo.co.uk): a missing parameter on mp_msg meant it crashed instead of printing a nice message if you put entries in the config with no parameter. also did a few english-tidies on error messages in there. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10246 b3059339-0415-0410-9bf9-f77b7e298cf2
* longer option buffers, needed for tv optionshenry2003-04-031-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9814 b3059339-0415-0410-9bf9-f77b7e298cf2
* Better error messages (with line number now) and make unknow optionalbeu2003-03-131-7/+11
| | | | | | | non-fatal for ppl wich compile many different versions git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9579 b3059339-0415-0410-9bf9-f77b7e298cf2
* New config system + cleanup of header inter dependencyalbeu2002-11-121-0/+211
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8165 b3059339-0415-0410-9bf9-f77b7e298cf2