summaryrefslogtreecommitdiffstats
path: root/options/parse_commandline.c
Commit message (Collapse)AuthorAgeFilesLines
* options: remove unneeded hack from command line parserwm42015-04-231-5/+0
| | | | | | | | | | | | | | | This was traditionally needed to silence terminal output from errors during command line parsing preparsing. Preparsing is done so that options controlling the terminal and config files are parsed and applied first, with a second command line parsing pass applying all other options, _and_ printing error messages for the preparsed ones. But the hack silencing log output during the preparse pass is actually not needed anymore, since the terminal is enabled only after preparsing is finished. update_logging() in main.c does this. So as long as update_logging() is called before m_config_preparse_command_line(), this will work.
* Update license headersMarcin Kurczewski2015-04-131-5/+4
| | | | Signed-off-by: wm4 <wm4@nowhere>
* parse_commandline: fail gracefully on bad argswd02015-03-291-2/+5
| | | | | | Args of zero length (i.e. --=) now display a proper error message. Signed-off-by: wm4 <wm4@nowhere>
* player: fix operation if command line is emptywm42015-03-061-2/+2
| | | | | | | main() being called with argc==0 is probably possible. Fix by skipping the program name early. (I already changed and reverted this once, but this time we make sure that it's less likely to confuse the skipped argv with main()'s argv by naming it "options".)
* player: minor simplificationwm42015-03-051-10/+6
| | | | | argv is always terminated with a NULL, so we don't need to drag argc along. Simplifies the following commit a little bit.
* demux: add a demux_open_url() functionwm42015-02-201-1/+2
| | | | | Often stream and a demuxer are opened at the same time. Provide a function for this and replace most of its uses.
* options: add slightly more sophistcated mechanism for option deprecationwm42014-12-111-0/+3
|
* terminal: strictly don't read terminal input if stdout is not a terminalwm42014-10-231-4/+0
| | | | | | | | | | | | | Doing that doesn't make sense anyway: it's meant for interactive input, and if the output of the player is not on the terminal, how will you interact with it? It was also quite in the way when trying to read verbose output with e.g. less while the player was running, because the player would grab half of all input meant for less (simply because stdin is still connected to the terminal). Remove the now redundant special-casing of pipe input.
* options: fix "-" (stdin) inputwm42014-05-061-1/+1
| | | | | Input through stdin requires disabling the terminal layer, and commit 32c63f forgot to rename the option correctly.
* options: let unknown option case be handled by final option parserwm42014-05-051-4/+2
| | | | | | | If an option is completely missing, let m_config_parse_option() handle this case, instead of erroring out early. Needed for the following commit.
* options: rename input-related optionsMartin Herkt2014-05-041-1/+1
| | | | | | | | | | | --ar → --input-appleremote --consolecontrols → --input-terminal --media-keys → --input-media-keys --joystick → --input-joystick --lirc → --input-lirc --lircconf → --input-lirc-conf --mouse-movements → --input-cursor --right-alt-gr → --input-right-alt-gr
* build: glob() is always availablewm42014-04-221-2/+0
| | | | | | | | | glob() is mandated by POSIX. For the only non-POSIX platform we support, Windows, we have our own replacement. So the ifdeffery is not needed. Still leave the checks in the configure scripts, because they have to decide whether to compile the replacement or not. (Although this could be special cased to mingw-only, the wscript seems to make this hard.)
* parse_commandline: glob filenames on WindowsJames Ross-Gowan2014-04-211-2/+26
| | | | | | The Windows port uses CommandLineToArgvW, which doesn't expand wildcards in command line arguments. Use glob to expand them instead, but only for non-option arguments.
* player: remove ASX, SMIL and NSC playlist parserswm42014-04-131-1/+0
| | | | | | | | | | | | | | | | | | | These playlist parsers are all what's left from the old mplayer playlist parsing code. All of it is old code that does little error checking; the type of C string parsing code that gives you nightmare. Some playlist parsers have been rewritten and are located in demux_playlist.c. The removed formats were not reimplemented. ASX and SMIL use XML, and since we don't want to depend on a full blown XML parser, this is not so easy. Possibly these formats could be supported by writing a very primitive XML-like lexer, which would lead to success with most real world files, but I haven't attempted that. As for NSC, I couldn't find any URL that worked with MPlayer, and in general this formats seems to be more than dead. Move playlist_parse_file() to playlist.c. It's pretty small now, and basically just opens a stream and a demuxer. No use keeping playlist_parser.c just for this.
* player: remove confusing argc/argv adjustmentwm42014-03-231-2/+2
| | | | It's better if argc/argv always mean the same thing.
* options: fix allowed DVD start titlewm42014-03-171-1/+1
|
* msg: move special declarations to msg_control.hwm42014-01-161-0/+1
| | | | | While almost everything uses msg.h, the moved definitions are rarely needed by anything.
* msg: remove global statewm42013-12-211-4/+9
|
* playlist_parser: mp_msg conversionwm42013-12-211-2/+1
|
* options: some more mp_msg conversionswm42013-12-211-17/+11
|
* msg: change hack to silence command line pre-parse error messageswm42013-12-201-5/+2
| | | | mp_msg_levels[] will go away.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-3/+3
|
* Move options/config related files from mpvcore/ to options/wm42013-12-171-0/+294
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.